stevehamby
MIS
Hi,
whats the best method of converting an Oracle date e.g. seconds from 01/01/1970 to a date/datetime in cognos impromtu 6 (version 6.0.506.0)?
I currently use the following function (which I inherited from the bloke who had my job before me)...
datetime-to-date(days-from-1900-to-datetime((order_date/86400)+25568))
but this is inaccurate e.g. 1082415000 (19/04/04 22:50:00) converts to 20/04/04 but 1082414820 (19/04/04 22:47:00) converts to 19/04/04
This is due to it rounding the resultant division of the date by 86400 to only one decimal place. Is there anyway to specify for the system to round to x decimal places rather than just one?
Answers A.S.A.P. cheers
whats the best method of converting an Oracle date e.g. seconds from 01/01/1970 to a date/datetime in cognos impromtu 6 (version 6.0.506.0)?
I currently use the following function (which I inherited from the bloke who had my job before me)...
datetime-to-date(days-from-1900-to-datetime((order_date/86400)+25568))
but this is inaccurate e.g. 1082415000 (19/04/04 22:50:00) converts to 20/04/04 but 1082414820 (19/04/04 22:47:00) converts to 19/04/04
This is due to it rounding the resultant division of the date by 86400 to only one decimal place. Is there anyway to specify for the system to round to x decimal places rather than just one?
Answers A.S.A.P. cheers