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!

convert numeric to date

Status
Not open for further replies.

witt

Programmer
May 29, 2003
4
US
Is there a way to convert a numeric field (containing a date in the format YYMMDD, eg. '030401' for April 1, 2003) to a date field?

thanks
Witt
 
NumberToDate(20000000+{YourField})

You will need to download NumbertoDate() from the crystal decisions website. This is a UFL which is not normally shipped with your Crystal CD.

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
You can use :

Date(
Right(totext(030401,"000000"),2)&"/"&
Mid(totext(030401,"000000"),3,2)&"/"&
Left(totext(030401,"000000"),2)
)

Reebo
Scotland (Sunny with a Smile)
 
Hello

I am looking for a way to convert the following into a readable format (it is an Microsoft UTC date from an event log) I am reading data in from an SQL database but want the report to display it in a nice format

Thanks in Advance

Rich

20030529085254.000000+060
 
You should start a new thread for this........

Anyway, use :

//For string datetime
DTSToDateTime(Picture({field},"xxxx/xx/xx xx:xx:xx"))

//For numeric datetime
DTSToDateTime(Picture(totext({field},0,""),"xxxx/xx/xx xx:xx:xx"))

replace italics with your field.....


Reebo
Scotland (Sunny with a Smile)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top