Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8342265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T05:43:09+00:00 2026-06-09T05:43:09+00:00

Using Crystal Reports 2008, I need to extract a date from a text field.

  • 0

Using Crystal Reports 2008, I need to extract a date from a text field. This date is usually in the format dd/mm/yy, but could also be entered as d/m/yy, dd/m/yyyy, etc.

This date could appear anywhere within the string.

At the moment I am relying on the fact that the date is placed at the end of the string, without a following fullstop, and using LEFT/RIGHT to extract each date part. These parts are then passed to another formula to create a full date:

Dim AllocationDate() as Date
If Not(IsNull({Command.Notes})) then
Formula = DateValue ((ToNumber ({@Year})), (ToNumber ({@Month})), (ToNumber ({@Day})))

However, if anyone uses a variation of format, adds a fullstop or more notes after the date the whole report keels over.

Is there any way I could extract this date by looking for a pattern? I’m guessing I could the use TRIM to get around the inconsistencies in format.

tyvmia

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T05:43:11+00:00Added an answer on June 9, 2026 at 5:43 am

    And, as a last resort, you can try converting the multi-line string into a long string by replacing the special characters that represent CR, LF, etc. Replacing them with spaces or another innocuous character, and then treat the resultant string as if it were just a regular string (with the date in the middle).

    You would still have to make some assumptions to make this possible: ONE date per string, all special characters are known (or you have to test for all possible special characters), the date has SOME conformity to the format, etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are using SAP Integration KIT and Crystal Reports 2008. The Crystal Reports are
I have a report made with Crystal Reports 2008 that I need to deploy
I am using Crystal Reports 2008 to develop some reports (on an oracle database
I am using Crystal Reports in Visual Studio 2008. I have about 5 pages
In Crystal Reports 2008, I need to have an accurate count of all of
I am using Crystal Reports 2008 to design reports and the Crystal Reports 2008
Is there any way to change text of text object on crystal reports using
I am using CRS (Crystal Reports Server) 2008 v1 and we are viewing reports
I am using crystal reports (the version that comes with visual studio 2008) to
Using VS 2008 Crystal Reports, I would like to do a running total on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.