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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error when converting numeric to date

Status
Not open for further replies.

amih

Technical User
Aug 2, 2002
3
US
A newbie here:

I am trying to convert a numeric field into a date field. I created individual formulas for the month, day, year. When I go to combine those results, I receive the error, 'The string is non-numeric"


Here's what I have:
The formulas for month, day, year follow this format: ToText ({LACTG04.AG4_TRANS_RELS_DAT})[8 to 9]

The formula to combine look like this:
Date(ToNumber({@month}),ToNumber({@DAY}),ToNumber({@year}))

What am I doing wrong???

Any assistance is greatly appreciated.
 
What format if your field in? If it is an 8 digit integer in a YYYYMMDD format, download NumberToDate() from the crystal decisions website, and convert your number to a date with this function. Software Training and Support for Macola, Crystal Reports and Goldmine
714-348-0964
dgilsdorf@mchsi.com
 
Your formula is in the wrong order///it must be in year,month,day order

Date(ToNumber({@year}),ToNumber({@month}),ToNumber({@DAY})) Jim Broadbent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top