Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

date runction

Status
Not open for further replies.

nagama

Programmer
Joined
Jul 7, 2006
Messages
1
Location
US
Hi.,

Can somebody help to get the date in the following format.

dd-mon-yy (i.e, 01-May-05).

Thanks for your help.

 
select current_date (format 'yyyy-mmm-dd');

*** Query completed. One row found. One column returned.
*** Total elapsed time was 1 second.

Date
-----------
2006-Jul-08

Dieter

 
Unless something has change, ODBC does not accept format statements. If you are using ODBC connectivity you will also need to CAST the date to maintain the format:

select CAST(current_date (format'yyyy-mmm-dd')as char(11));
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top