Type | Bug | Status | dismissed | Date | 18-Nov-2010 14:27 |
---|---|---|---|---|---|
Version | alpha 110 | Category | Datatype | Submitted by | Sunanda |
Platform | All | Severity | minor | Priority | normal |
Summary | DIFFERENCE fails on dates 69 years apart |
---|---|
Description |
Limit of range: difference 18-nov-2010 + 24855 18-nov-2010 == 596520:00 1 beyond the range limit: difference 18-nov-2010 + 24856 18-nov-2010 ** Math error: math or number overflow ** Where: difference ** Near: difference 18-Nov-2010 + 24856 18-Nov-2010 Looks like DIFFERENCE holds the seconds in a 32-bit INT: 596520 hours ===> 2147472000 seconds |
Example code |
876000 = difference 1-jan-2000 1-jan-2100 |
Assigned to | n/a | Fixed in | - | Last Update | 21-Nov-2010 21:44 |
---|
Comments | |
---|---|
(0002904)
mikerev 18-Nov-2010 21:54 |
It is a time! limit:
to time! 2147483647 to time! -2147483647 Are you asking for a time! datatype with 64 bit secs? |
(0002905)
BrianH 19-Nov-2010 03:40 |
Note that if times are more than 32 bits then there won't be enough room for the date part of a date!. DIFFERENCE could work with 64bit arithmetic but then it couldn't encode such a value as a time!. |
(0002912)
Carl 21-Nov-2010 21:44 |
Use will need to use subtract for large date ranges, eg:
>> 24 * 60 * 60 * subtract 1-jan-2000 1-jan-2100 == -3155760000 DIFFERENCE is for precise time, computing to time to nano-second. Not reasonable over so many years, is it? |
Date | User | Field | Action | Change |
---|---|---|---|---|
21-Nov-2010 21:44 | carl | Status | Modified | submitted => dismissed |
21-Nov-2010 21:44 | carl | Comment : 0002912 | Added | - |
19-Nov-2010 03:41 | BrianH | Description | Modified | - |
19-Nov-2010 03:41 | BrianH | Category | Modified | Unspecified => Datatype |
19-Nov-2010 03:40 | BrianH | Comment : 0002905 | Added | - |
18-Nov-2010 21:54 | mikerev | Comment : 0002904 | Added | - |
18-Nov-2010 14:27 | sunanda | Ticket | Added | - |