Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a date field

Status
Not open for further replies.

huskerfan1

IS-IT--Management
Aug 22, 2001
20
US
I have a year, month, and date string fields that I want to put together into a date. Some of the data in the fields is junk. How do I write a formula that takes into account that some of the data won't produce a valid date due to the junk?


 
need more info -define "junk" ? numbers? letters? gibberish?

lmc
cryerlisa@hotmail.com
 
Try something like:

If Val({Monthstring}) in 1 to 12 and
Val({Daystring}) in 1 to 31 and
Val({Yearstring}) in 1950 to 2050

then Date (Val({Yearstring}),
Val({Monthstring}),
Val({Daystring}) ) Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top