Results 1 to 5 of 5
  1. #1
    Join Date
    May 2003
    Posts
    3

    Angry Unanswered: to_date function in informix

    Hey can any one tell the equivalant of to_date of oracle. my problem is i am trying to insert data in dd/mm/yyyy format but the informix default format is set to mm/dd/yyyy


    the insert statement is as follows

    insert into testingdate values(to_date('20/03/2004', '%d/%m/%y'));

    but some how this works

    select to_char(datetest, '%d/%m/%y') from testingdate;

    and returns me date in dd/mm/yy ...

  2. #2
    Join Date
    May 2003
    Posts
    60

    Re: to_date function in informix

    Originally posted by rajeshwar_rao
    Hey can any one tell the equivalant of to_date of oracle. my problem is i am trying to insert data in dd/mm/yyyy format but the informix default format is set to mm/dd/yyyy


    the insert statement is as follows

    insert into testingdate values(to_date('20/03/2004', '%d/%m/%y'));

    but some how this works

    select to_char(datetest, '%d/%m/%y') from testingdate;

    and returns me date in dd/mm/yy ...
    Try a capital Y

  3. #3
    Join Date
    May 2003
    Posts
    3
    Hi thanq for the suggestion its not Y but its 'iy'

  4. #4
    Join Date
    May 2003
    Posts
    60
    Originally posted by rajeshwar_rao
    Hi thanq for the suggestion its not Y but its 'iy'
    Oh Yeah!

    Have just double checked the documentation!

  5. #5
    Join Date
    May 2003
    Posts
    3
    In fact i cheked it and also tried it over the database it works that way

    Thanks and regards

Posting Permissions

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