Feb 24, 2005 #1 Joelcc Programmer Feb 9, 2005 6 US Hello, Using Crystal 7, and have a string (20050215) that I'm trying to convert to a Date field 02/15/2005, but have not found a function to do that in 7.0. I appreciate the help
Hello, Using Crystal 7, and have a string (20050215) that I'm trying to convert to a Date field 02/15/2005, but have not found a function to do that in 7.0. I appreciate the help
Feb 24, 2005 #2 synapsevampire Programmer Mar 23, 2002 20,180 US Try: if len({table.date}) = 8 then cdate(left({table.date},4),mid({table.date},5,2),mid({table.date},7,2)) else cdate(0,0,0) Note that any calculations/aggregates against this formula would then verify that the @dateformula <> cdate(0,0,0) as this identifies an invalid date. -k Upvote 0 Downvote
Try: if len({table.date}) = 8 then cdate(left({table.date},4),mid({table.date},5,2),mid({table.date},7,2)) else cdate(0,0,0) Note that any calculations/aggregates against this formula would then verify that the @dateformula <> cdate(0,0,0) as this identifies an invalid date. -k
Feb 24, 2005 #3 dgillz Instructor Mar 2, 2001 10,043 US Download the NumberToDate() function and write a formula like this: NumberToDate(val({YourField})) Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports http://www.gainfocus.biz Upvote 0 Downvote
Download the NumberToDate() function and write a formula like this: NumberToDate(val({YourField})) Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports http://www.gainfocus.biz