that’s a strange issue. I tried to reproduce your problem with the CSV Writer but without success. Could you please try the following simple setup
Time Generator -> Time To String -> String to Date/Time -> CSV Writer
and compare the two appended date columns with the original one? Do the dates match?
Time Generator, 1 row, left default “Use date” set for start and end, date = 2009-2-22 and 2010-2-22 Time to String, left defaults but changed format to yyyy-MM-dd String to Date/Time, left defaults but changed format to yyyy-MM-dd as well
Preview output is
22.Feb.2009, 2009-02-22, 22.Feb.2009
But…
Here is the .csv file output
"2009-02-21",“2009-02-22”,“2009-02-21”
I’m wondering if it might be a time zone issue? When I open the Time Generator the end point date is defaulted to 2-22-2010 which is tomorrow for me. I am running this at 8:40PM on 2-21-2010.
Did some more testing by including the hour.
I set the hour to 10 which shows up correctly in all three columns in the preview but I get this when it is written to the .csv file…
“2009-02-22T02:00:00”,“2009-02-22;10:00:00.0”,“2009-02-22T02:00:00.0”
OK, figured out a work around for now.
I’m using the “Preset Date/Time” node to set the hours on my date to 10.
This changes my column from 2010-02-22 to 2010-02-22 10:00:00
which then writes out as 2010-02-22 02:00:00AM in an Oracle database. Since I only care that the year, month, day is correct this works for now.
Hi, I have asimilar problembut in my caseis addingfour hoursto date,and mywork is veryimportanttimesof the dayand the date ofeach recordinthe database.What could I do?? regards Lisi