• Convert Text Desc. to Date (2003 SP1)

    Author
    Topic
    #435507

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

    Description
    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.

    Viewing 0 reply threads
    Author
    Replies
    • #1029519

      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.

    Viewing 0 reply threads
    Reply To: Convert Text Desc. to Date (2003 SP1)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: