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

Number Date Conversion

Status
Not open for further replies.

gilsonr

Technical User
Mar 16, 2002
19
GB
I have a Date field which is displayed as a series of numbers i.e. 200203051200310, and I want to convert this to a date field.

Attached is the formula that I have been using to convert the number to a date.

CDate(Mid([dbo_options]![LAST_UPDATE_MINI],7,2) & "/" & Mid([dbo_options]![LAST_UPDATE_MINI],5,2) & "/" & Left([dbo_options]![LAST_UPDATE_MINI],4))


When I try to refresh the report I get an 'Bad Date String Format' Message. Any Ideas
 
Take the field in question and divide it by 1 million, and truncate it. Then use the numbertodate() function.

Numbertodate(20020402) returns 4/2/2002.

Numbertodate is a UFL available for download on the Crystal Decisions website. Software Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top