Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2007
    Posts
    5

    Unanswered: date conversion?

    Hi there,
    I have to compare date fields from different libraries which I am using in the crystal report. One is in the format MMDDYYYY and the other is in MM/DD/YYYY.
    SO i need to add '/'to mmddyyyy and compare it with mm/dd/yyyyy.

    How to do it in Crystal report(formula workshop)?

    Please help me.


    Thank you

  2. #2
    Join Date
    May 2003
    Location
    UK
    Posts
    233
    Create a formula. Then change the syntax drop down to “Basic Syntax”. Then enter the following code inserting the field name where your date is stored.

    Dim dd, mm, yyyy As String
    Dim FormatDte As String

    yyyy = Mid(Totext({Field_Name}),5,4)
    mm = Left (Totext({Field_name}),2)
    dd = Mid (Totext({Field_Name}),3,2)

    FormatDte = mm +"/"+ dd + "/" + yyyy
    formula = ((formatDte))

  3. #3
    Join Date
    Sep 2007
    Posts
    5

    thanks

    Thank you very much.

Posting Permissions

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