This content has been marked as final. Show 4 replies
Also, why when I insert a new record does Date() not give current time? It will show the date just fine, but for time it's always 0:00:00.
I can't speak to "best practice", but there are solutions either direction you go.
I use the DB's DateTime format for date time fields. I use mostly xml for data transport, and my DB(SQL server) and back-end(.net) serialize the DateTime field into a sortable string format (yyyy-mm-ddTHH:MM:SS).
I wrote my own functions for manipulating these date strings on the Flex client, and use those functions to format dates for display, and to take an AS3 Date() object and parse it into the ISO form string when I send a date back to the DB.
Just bumping this thread with a question: How can I pass a date value from Date() to an access db without losing the time portion? Every time I send Date() to access, the column holds the date, but not the time. Then, when I call the column in my app, the date appears as M-D-YYYY 00:00:00.
Honestly, my problem would be solved if either
A) I could get one column to hold the full Date() (as in date + time) or
B) I could pass the date and time of Date() individually to two columns
The only way I've been able to pass date and time separately is by using DateFormatter with two different formats, but this puts the dates as a string.
Is is possible to convert this string back to a date before passing it to my database?
Where in the chain is the time part getting lost?
For that matter, we need more detail on the full data flow architecture.