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

Converting STRING (date as string) to a DATE value 1

Status
Not open for further replies.

Adamxxx

MIS
Apr 30, 2001
12
AU
Am using a database which allocates time buckets as STRING values. Would like to somehow convert the values in this field to date values so i can then group by time in what ever interval i want using the group expert. The database (which I cant control) records info in 15 minute intervals. I would like to create a report in 1 hour intervals. It seems easy to convert a date to a string but much more difficult to convert a string to a date. Can anyone help?
 
Depending on your version of Crystal Reports, you can use the DateTimeValue() function. The online help has the syntax details. Malcolm
 
We use crystal reports 6 which evidently doesnt have this function. What other options might exist? Thanks!
 
What does a sample time string look like? ie, how is it stored? Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
stored as 22 character string:

example:

1996/12/08 23:59:00:00
 
Look in your additional functions for a function called DTSToDateTime(). This will work with your string if you have it. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top