View Full Version : TO_DATE format

11-20-2006, 03:45 PM
Hi Guys,

Having trouble converting and adding a date to table, the date string is of the format 31-12-2006 16:21, and in the INSERT im trying

'TO_DATE($details{'start_date'},'DD-MM-YYYY HH24:MI'),
'TO_DATE($details{'end_date'}','DD-MM-YYYY HH24:MI'),

Any ideas?

Thanks in advance.

11-21-2006, 11:22 AM
TO_DATE('$details{'start_date'}','DD-MM-YYYY HH24:MI'),
TO_DATE('$details{'end_date'}','DD-MM-YYYY HH24:MI'),

Was just missplaced single quotes in perl!!!

11-21-2006, 06:27 PM
tom, if you are posting in the general database forum, please specify the database you are using. there are differences in syntax (as well as things like what values can be held in a date string) between databases.