Home » SQL & PL/SQL » SQL & PL/SQL » how take date from user in print in following format
how take date from user in print in following format [message #344621] Sun, 31 August 2008 01:51 Go to next message
kim_SQL
Messages: 2
Registered: August 2008
Junior Member
how to take the string 'February 06, 1968' and outputs '06-FEB-68'.?
Re: how take date from user in print in following format [message #344624 is a reply to message #344621] Sun, 31 August 2008 02:25 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Use to_date to convert the input from string to date and to_char to convert the date to a string for output.
See this page for format models.

[Edit: Added links]

[Updated on: Sun, 31 August 2008 02:28]

Report message to a moderator

Re: how take date from user in print in following format [message #345012 is a reply to message #344621] Tue, 02 September 2008 02:34 Go to previous messageGo to next message
spmano1983
Messages: 269
Registered: September 2007
Senior Member
to_char(to_date('February 06, 1968','Month dd, yyyy'),'DD-MON-YY') 
Re: how take date from user in print in following format [message #345030 is a reply to message #345012] Tue, 02 September 2008 03:07 Go to previous message
Michel Cadot
Messages: 64102
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
What does this add to Frank's answer but breaking the rules?
Once again, read and follow OraFAQ Forum Guide

Regards
Michel
Previous Topic: creating new user
Next Topic: Ms-access and oracle connection
Goto Forum:
  


Current Time: Fri Dec 02 14:36:37 CST 2016

Total time taken to generate the page: 0.26588 seconds