Hi Prasad,

Sybase is not intelligent enough to parse something like 'mm/dd/yyyy'.
Instead it gives you a set of pre-defined formats, associated with some
numbers. You can see them in the reference manual.

If you wanted:
 >> TO_CHAR(dateField, 'mm/dd/yy') <<
Sybase offers you:
>> convert(char(8),dateField,101)<<

Unfortunately, the list of pre-defined codes is not too long, and only two
of them have yyyy. 'mm/dd/yyy' is not available! Looks like Sybase hasn't
taken Y2K very seriously. (talking about Sybase 11.x.x  Not sure if things
have changed recently)

My guess is, you would do better bringing the date to the ND and doing your
formatting there.

Regards,

Aby





> -----Original Message-----
> From: Moganna, Prasad [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, May 25, 1999 2:29 PM
> To:   '[EMAIL PROTECTED]'
> Subject:      [ND] Equivalent date format in Sybase......
> 
> One of my dataobjects retrieves data from the sybase database which is
> located
> at a remote place. 
> 
> I wanted to know the equivalent date format functions in Sybase. just like
> in ORACLE you have
> TO_CHAR('06/24/1999', 'mm/dd/yyyy') and to_date('03/24/1997',
> 'mm/dd/yyyy')
> 
> Also I wanted to know if there is any table in sybase like the "dual"
> present in ORACLE
> 
> 
> Thanks In Advance,
> Prasad
> _________________________________________________________________________
> 
> For help in using, subscribing, and unsubscribing to the discussion
> forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
> 
> For dire need help, email: [EMAIL PROTECTED]
_________________________________________________________________________

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]

Reply via email to