Sybase Convert Function
Home / Database / Sybase / Convert
Google
 
Web Compuspec.net

Date Format Conversion

Convert between data types or date formats.

 
StyleOutput (yy)
0mon dd yyyy hh:miAM (or PM)
1mm/dd/yy
2yy.mm.dd
3dd/mm/yy
4yy.mm.dd
5dd-mm-yy
6dd mon yy
7mon dd, yy
8hh:mm:ss
9mon dd yyyy hh:mi:ss:mmmAM (or PM)
10mm-dd-yy
11yy/mm/dd
12yymmdd
StyleOutput (yyyy)
100mon dd yyyy hh:miAM (or PM)
101mm/dd/yyyy
102yyyy.mm.dd
103dd/mm/yyyy
104yyyy.mm.dd
105dd-mm-yyyy
106dd mon yyyy
107mon dd, yyyy
108hh:mm:ss
109mon dd yyyy hh:mi:ss:mmmAM (or PM)
110mm-dd-yyyy
111yyyy/mm/dd
112yyyymmdd

Example: select convert( char(8), getdate(), 112 )