From: Andrew H. <hu...@ll...> - 2003-01-06 16:11:29
|
At 10:41 PM 1/5/2003 -0500, you wrote: >This is a simple SQL question, but I figured there are enough folks on >here who work with different database platforms to know: what's the most >common datatype to hold a date and time value? I've been using 'datetime', >but that seems to have gone away in the newest PostgreSQL release, being >replaced by 'timestamp' > >The type 'timestamp' is referenced as a SQL-92 datatype [1], but a MySQL >page [2] uses 'timestamp' as a date plus time that is automatically set to >the time of the last insert/update. FirebirdSQL/InterBase also seem to use >'timestamp' as a datetime column type. > >So my question is: is there any consistent column type for this, or do I >need to make this vary among database vendors as well? I haven't looked into it too much, but to add one more data point to the list, Oracle uses 'date' columns which store the date and the time. I would expect you need to make this vary among the vendors, and have special cases for it. What might be worse is the date/time formatting, I doubt that it's standardized. -Andrew >Thanks, > >Chris > >[1] http://www.commandprompt.com/ppbook/index.lxp?lxpwrap=x2632%2ehtm >[2] >http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#DATETIME >[3] http://www.firebirdsql.org/index.php?op=faq >-- >Chris Winters (ch...@cw...) >Building enterprise-capable snack solutions since 1988. > > > >------------------------------------------------------- >This sf.net email is sponsored by:ThinkGeek >Welcome to geek heaven. >http://thinkgeek.com/sf >_______________________________________________ >openinteract-dev mailing list >ope...@li... >https://lists.sourceforge.net/lists/listinfo/openinteract-dev |