Joined: 29 Dec 2008
Location: United States
Online Status: Offline
Posts: 143
Topic: String to Date convert Posted: 05 Jan 2009 at 11:11am
Hi again =D
i'm still using CRXI annnd....
I'm trying to take a data field which is stored as a string and convert it into DateTime. I've been trying to play around with the actual functions in crystal reports... doesn't come up with a syntex error but at report launch it comes up with "Bad date format string."
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 05 Jan 2009 at 3:04pm
You can use the IsDateTime(field) to check to see if that can be converted to a datetime as it is. I think it may be handling it as a number which is too large to be considered a date.
if the IsDateTime(field) returns true then it can be converted, or false means it cannot be converted.
If it is false you may have to parse that field into something it would accept like "2008,12,01" and convert the parsed field.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum