Inserting Current Date with time stamp in oracle database
I want to insert the current Date and time stamp in a field in the Oracle Database Table.
I am able to insert date but i am not able to insert the date with time stamp. Any Suggestions??
Do you want to get current date (from sysdate) with a specific format or transform a value containing a date/time value to insert it in ORACLE ?
Usually, you insert current datetimestamp in a date field using this :
you may have to tweak the format pattern ('dd/mm....') according to your needs
if you want to transform a date, use something like this:
but make sure your format is compliant with your date, ie
TO_DATE('31/12/2008','MM/DD/YYYY') could raise error (litteral does not match) cuz ORACLE can't recognize 31 as a month pattern