Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2004
    Posts
    5

    Question Unanswered: date in mon yyyy format???

    hi all,
    Can anyone help me gettting date in mon yyyy format???
    for ex: Jan 2004.
    I know we have convert function in sybase to get date in different formats, but am not sure for mon YYYY format.

    Thanks In Advance,
    Rahul

  2. #2
    Join Date
    Mar 2001
    Location
    Lexington, KY
    Posts
    606
    I think you'll have to do something like this:
    RIGHT( CONVERT( CHAR( 11 ), getdate(), 106 ), 8 )

    or substring to start at position 4 and go to the end.

    I really wish ASE would adopt Oracle's TO_CHAR since it's way more flexible and easy to use (no need to memorize CONVERT numbers).
    Thanks,

    Matt

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •