You are not logged in or registered. Please login or register to use the full functionality of this Website SybaseTeam.Com...
Hello There, Guest! (LoginRegister) Remember Me? Current time: 09-18-2014, 12:35 AM
   Home  |  About Us  |  Sybase Training  |  Synergy  |  Consulting  |  Job Openings  |  Tech Videos  |  Rules and Disclaimer  |  Search
Post Reply 
Forum Tools
sybase date format
07-06-2009, 06:19 PM
Post: #1
Quote this message in a reply
sybase date format


Date Format Conversion

Convert between data types or date formats.

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

Example: select convert( char(8), getdate(), 112 )
Last Updated: $Date: 2006/06/19 04:23:21 $

Valid XHTML 1.0!
Valid CSS!


Find all posts by this user
07-07-2009, 06:44 PM
Post: #2
Quote this message in a reply
RE: sybase date format conversion


You are not logged in or registered. Please login or register to use the full functionality of this Website SybaseTeam.Com...

Sybase 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 )




Find all posts by this user
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  compare date in different format lalitpct 2 3,634 04-17-2012 04:44 PM
Last Post: Bharathvajan
Rolleyes How to convert date tamvgi 1 2,767 12-04-2011 09:09 PM
Last Post: Nagu
  date function in sybase rbathena 2 3,741 11-21-2011 03:13 PM
Last Post: dvdanurag@gmail.com
  Sybase date Rogerg 2 3,350 01-11-2011 10:22 AM
Last Post: arukaru500
  Need help in converting String to Date format surbhit4u 1 6,057 12-22-2010 05:21 AM
Last Post: vijesh.chandra
  transact SQL date and time format john 0 5,097 07-06-2009 06:28 PM
Last Post: john

Options:
Forum Jump:


Contact Us | SybaseTeam | Disclaimer & Rules | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication