Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am fetching data from Oracle DB,where date fields are having values starting from '1/1/4000'.
How can we convert this to Standard Date Format 'DD/MM/YYYY hh:mm:ss TT'.
try
Date(Date#(urDatefield,'D/M/YYYY'),'DD/MM/YYYY hh:mm:ss TT') AS newdate
Date(AddYears(Floor(Date#(MasonicDate,'DD/MM/YYYY')),-2000),'DD/MM/YYYY hh:mm:ss TT') AS GregorianDate
If you want to keep the time parts then remove the floor() function from the above expression.
Thanks for the reply Gysbert,
Explanation of date field format :-
(1st octet is month, 2nd Octet is days and 3rd Octet is hours).
For eg: 000 8:22:13 (7 months, 21 days, 13 hrs)
This is required to be converted to standard format in minutes i.e(mm)