-
Website
http://awads.net/wp/ -
Original page
http://awads.net/wp/2008/04/17/give-me-the-current-date-please/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
jgarry
3 comments · 1 points
-
Andy C
22 comments · 47 points
-
dahowlett
1 comment · 2 points
-
Don Seiler
9 comments · 1 points
-
davidhaimes
4 comments · 3 points
-
-
Popular Threads
Local dates cause 'big issues' when the apps are taken overseas!! Welcome to 2008 people! Local time and date - great for display, not for storage!!!
(then you have no daylight saving issues for instance!!)
some issues are related to Oracle and to the goverments changing rules over and over. Did you a know an island with about 500 people and 1000 birds did introduce a half-an-hour summer offset that produced bugs in 10gR2 :)
select timestamp '2007-10-27 15:00:00 +00:00' at time zone 'Australia/LHI' from dual;
ORA-01878: specified field not found in datetime or interval
But yes, using date instead of timestamp is probably not the best approach. Still a lot of function do not work with timestamp, like LAST_DAY, ADD_MONTHS and TRUNC
timestamps has another disadvanatge if you import (imp) data on a table with a timestamp, it's not loded bulk but row per row. that's what i experienced on 10.2;
if a sysdate should be used or not could be depend on businesss rules. For example using ebay a sysdate should used to store your transaction to be able to compare it against other competitiors
cheers
Karl