Re: sysdate/time syntax
Date: Wed, 04 Aug 1999 03:18:27 GMT
Message-ID: <37a7ac14.167119404_at_Oracle8>
[Quoted] On Tue, 3 Aug 1999 14:41:22 -0500, "Joet Singh" <jsingh_at_bigfoot.com> wrote:
>What is the syntax for obtaining sysdate and time? I need to set a default
>value for field with both date and time. Any ideas?
YES, I do thanks to Thomas Kyte who told me this last week.. (Thanks a lot Thomas!)
[Quoted] to set a date and time of 4 August 1999 21:58 pm , use the function to_date [Quoted] which will convert any date and time in character string format to a date (and time) value to store in a date field as follows:
to_date(date_string, format)
so
to_date('04-AUG-99-2158', 'DD-MON-YY-HH24MI')
Note that the colon (:) between hours, minutes and seconds may at times confuse the syntax, so better not use it when entering time values.
Han.
+----------------------------------------------------------+ [Quoted] [Quoted] | Han Thomas 30/1 Ton Kham Road, Tha Sala | | Han_at_Royal.net Muang Chiang Mai 50000 THAILAND | | www.afmgroup.com/han tel 053-308958 fax 249854 | +----------------------------------------------------------+Received on Wed Aug 04 1999 - 05:18:27 CEST