Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Database Server Software > Informix > to_date function in informix

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-21-03, 02:30
rajeshwar_rao rajeshwar_rao is offline
Registered User
 
Join Date: May 2003
Posts: 3
Angry 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 ...
Reply With Quote
  #2 (permalink)  
Old 05-21-03, 05:51
pprince pprince is offline
Registered User
 
Join Date: May 2003
Posts: 60
Re: to_date function in informix

Quote:
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
Reply With Quote
  #3 (permalink)  
Old 05-21-03, 05:54
rajeshwar_rao rajeshwar_rao is offline
Registered User
 
Join Date: May 2003
Posts: 3
Hi thanq for the suggestion its not Y but its 'iy'
Reply With Quote
  #4 (permalink)  
Old 05-21-03, 05:56
pprince pprince is offline
Registered User
 
Join Date: May 2003
Posts: 60
Quote:
Originally posted by rajeshwar_rao
Hi thanq for the suggestion its not Y but its 'iy'


Oh Yeah!

Have just double checked the documentation!
Reply With Quote
  #5 (permalink)  
Old 05-21-03, 05:58
rajeshwar_rao rajeshwar_rao is offline
Registered User
 
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On