Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2002
    Posts
    16

    Unanswered: Working with Sybase Dates

    Hi guys
    I was wondering if you could help me.

    I am currently working with Sybase.
    The dates within the Sybase tables are specified as YYYYMMDD e.g. 20020326.

    If todays date was 20020326, I would like to know what the exact date is 9 months ago.

    How can I go about finding this ?

    I would be most grateful if you could let me know.
    Thanks in advance
    Tony

  2. #2
    Join Date
    Feb 2002
    Posts
    16
    Hi guys
    I managed the solve the Sybase Dates problem (previous email)

    This is how I did it:

    (select convert(numeric(8,0), (select convert(varchar(8), dateadd(month,-9,'20020326'), 112))))

    Cheers
    Tony

Posting Permissions

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