|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
||||
|
||||
|
DB2 - equivalent of Oracle's sysdate ?
Haven't found this one yet - whats the DB2 equivalent of Oracle's sysdate function ?
__________________
Give a person code, and they'll hack for a day; Teach them how to code, and they'll hack forever. Analyze twice; hack once. The world's first existential ITIL question: If a change is released into production without a ticket to track it, was it actually released? About DrGroove: ITIL-Certified IT Process Engineer - Enterprise Application Architect - Freelance IT Journalist - Devshed Moderator - Funk Bassist Extraordinaire |
|
#2
|
|||
|
|||
|
DB2 has the standard function CURRENT_DATE.
|
|
#3
|
||||
|
||||
|
Quote:
sweet - thx mucho swampBoogie ![]() |
|
#4
|
||||
|
||||
|
Actually it is CURRENT DATE (no underscore, CURRENT_DATE is for MySQL). You can also use CURRENT TIME or CURRENT TIMESTAMP depending on your needs.
|
|
#5
|
|||
|
|||
|
Yes, you are right. My mistake.
|
|
#6
|
|||
|
|||
|
CURRENT DATE, etc. is correct. Also be advised that you can have some troubles when pulling from DB2 - valid date range
is 0001-01-01 to 12-31-9999, the lower end being beyond what ADO considers valid dates. Convert to CHAR(SOMEDATE) when extracting. Likewise, timestamps can be problematic... fv
__________________
...because that is the way we have always done it. We've been doing it like that for 80 Years! (How do we change that mindset?) |
![]() |
| Viewing: Dev Shed Forums > Databases > DB2 Development > DB2 - equivalent of Oracle's sysdate ? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|