Copy link to clipboard
Copied
Hi all,
While importing date value using cfspreadsheet tag, I am getting date in m/d/yy format although the XL sheet is having date in m/d/yyyy format.
When I convert them using dateformat function the dates like 1/1/1925 ( between the year 1900-1929 read as 1/1/25 by cfspreadsheet tag) got converted in to 1/1/2025 for m/d/yyyy format which is incorrect.
The issue is for all dates between the year 1900-1929. Rest of the dates are converting fine even though they are having 2 digits in year.
EX: The date 1/1/1930 which got converted into 1/1/30 by cfspreadsheet tag on applying m/d/yyyy dateformat function got converted into 1/1/1930 which is correct.
If any one has Idea about this issue please help.
Thanks
Sunil
Copy link to clipboard
Copied
Please note that the DateFormat function returns a string, not a datetime object. To represent a datetime object use, for example, CreateDate