Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm working with a Mantis table, but I don't know how to convert a number into a date value.
Looking into the table, all the date values are stored as integer.
When I try to use the date() function, I don't see correct values.
Does anyone help me please ?
Thanks in advance
Try:
Date(Date#(DateValue,'DD/MM/YYYY'),'DD/MM/YYYY')
Hi,
Suppose that your date field store value like:
a. 20130920 then we need to use Date(Date#(DateField,'YYYYMMDD'),'dd-MM-yyyy')
b. 20132009 then we need to use Date(Date#(DateField,'YYYYDDMM'),'dd-MM-yyyy')
c. 20092013 then we need to use Date(Date#(DateField,'DDMMYYYY'),'dd-MM-yyyy')
d. 09202013 then we need to use Date(Date#(DateField,'MMDDYYYY'),'dd-MM-yyyy')
Above just an idea to get start. BTW, can you share your date field format?
Regards,
Sokkorn
How is the Mantis table stored? If its a SQL table you are trying to load from using a SQL statement then do this...
select
cast(cast(YourDateField as datetime) as date) as DateFieldName
from
...
This assumes the original conversion of the date to Int was performed in SQL