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

Converting string to dateTime

Status
Not open for further replies.

sxmnl

Technical User
Dec 17, 2002
28
US
Thanks In Advance
I have a program that runs some math at 05:55:am every day. But I want to grab the new values for that day only, and
add to a report for that day.

My code looks like this
{PDL_TASK_VIEW.FCREATIONTIME} >= datetime(year(currentdate),month(currentdate),day(currentdate),5,45,0)

{PDL_TASK_VIEW.FCREATIONTIME} = a string value. I found out that this will not work becouse of DateTime.

So is there a easy way to convert my string variable to a datetime variable. then use the original code.



If any one has a simple solution I would appreciate it. I'm New to Crystal so easy is good right now.

Thanks


 
It is easier to convert the string to a datetime in a SQL expression rather than converting your datetime to a string (which doesn't do >= calculations in the same way). Give us and example of the string and someone can probably show you how to make a datetime of it (also DB you are using).

Lisa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top