Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Mar 2002
    Thanked 0 Times in 0 Posts

    Convert Text Desc. to Date (2003 SP1)

    I have a field in which I store descriptions like so...

    January 2006 Dues
    July 2006 Dues
    June 2006 Dues
    March 2006 Dues
    May 2006 Dues
    October 2006 Dues
    September 2006 Dues

    Unfortunately, on reports, I cannot sort this correctly in date order. Do I have any options to convert this somehow to a date or some other method to display this correctly. Any help would be much appreciated. Thanks in advance.

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Crystal Beach, FL, Florida, USA
    Thanked 33 Times in 33 Posts

    Re: Convert Text Desc. to Date (2003 SP1)

    I would store a date instead, then convert it to the string when displaying it. Otherwise, you will have to create a custom function to look at the first part of the string and convert it to a date. Something like:

    Public Function CnvDuesStringToDate(strDue) as date
    cnvDuesStringToDate = cDate( Left(strDue, instr(strDue," Dues") -1)
    end Function

    You can then sort the results of this.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

Posting Permissions

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