Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Jul 2003
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Date Formats (2000)

    I would like to know if there is a function that I can use within a select statement that will convert a date to either a text format or numerical. In another programming language I have worked with, the CTOD function would convert a date to a string in the yyyymmdd format. what I would like to be able to do is create a year month field (yyyymm) from my date field with one pass so I can group my date by year and month. I have tried year([date])&month([date]) but months eairler than october come out yyyym.

    Thanks,

    Richard

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Date Formats (2000)

    Try Format(yourdatefield,"yyyymm")
    Substitute yourdatefield for your field name for date.

  3. #3
    New Lounger
    Join Date
    Jul 2003
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date Formats (2000)

    works great! Thank you Pat

Posting Permissions

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