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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sybase alter session DATEFORMAT ???

Status
Not open for further replies.

Autosys

Programmer
Jun 1, 2004
90
GB
Hi there,

Can sombody please tell me how to format the Date for a patricular session in Sybase? I know in Oracle you can do a: alter session set nls_date_format = 'YYYY-MM-DD HH24:MI:SS'

All the examples I've so far seen for Sybase only show: 'alter session set DATEFORMAT ymd' How do you add the hours, minutes and seconds then?

Sorry if this is a stupid question but I'm having a moment.

Your help will be greatly appreciated.
S
 
Cheers DNG - You're right I can use the convert function for queries but would like to somhow alter the session once. Perhaps the convert function can still do that, I'll investigate.
 
Also try set dateformat for the session just like Oracle

1> set dateformat ymd
2> go
 
Have done that thanks mate! I'm just confused as to why you can't add the hh,mi,ss to that last statement of yours.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top