Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: TO_DATE format

  1. #1
    Regular Coder
    Join Date
    Apr 2005
    Location
    Ireland
    Posts
    122
    Thanks
    4
    Thanked 0 Times in 0 Posts

    TO_DATE format

    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.

  • #2
    Regular Coder
    Join Date
    Apr 2005
    Location
    Ireland
    Posts
    122
    Thanks
    4
    Thanked 0 Times in 0 Posts
    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!!!

  • #3
    Super Moderator guelphdad's Avatar
    Join Date
    Mar 2006
    Location
    St. Catharines, Ontario Canada
    Posts
    2,631
    Thanks
    4
    Thanked 147 Times in 138 Posts
    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.

    Thanks


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •