Jan 30, 2006 #1 twes3 Programmer Jun 1, 2004 16 US Hello. How do I convert character date field (YYYYMMDD) to a true date field? Thanks
Jan 30, 2006 #2 GJParker Programmer Jul 4, 2002 1,614 GB Code: CDate(Left({MyTable.Field},4),Mid({MyTable.Field},3,2),Right({MyTable.Field},2)) Gary Parker MIS Data Analyst Manchester, England Upvote 0 Downvote
Code: CDate(Left({MyTable.Field},4),Mid({MyTable.Field},3,2),Right({MyTable.Field},2)) Gary Parker MIS Data Analyst Manchester, England
Jan 30, 2006 #3 MisterMo Programmer Mar 18, 2002 564 GB use the date function in a formula eg. date({yourtable.datecharField}) then simply right click on the formula field and format as you see fit to any date format available. just in case you should also put a check to make sure that it will always return a date eg if IsDate ({yourtable.datecharField}) = true then date({yourtable.datecharField}) Mo Upvote 0 Downvote
use the date function in a formula eg. date({yourtable.datecharField}) then simply right click on the formula field and format as you see fit to any date format available. just in case you should also put a check to make sure that it will always return a date eg if IsDate ({yourtable.datecharField}) = true then date({yourtable.datecharField}) Mo
Jan 30, 2006 #4 MisterMo Programmer Mar 18, 2002 564 GB Sorry the isdate check and date option won't work without dividers on the string Mo Upvote 0 Downvote
Jan 30, 2006 #5 dgillz Instructor Mar 2, 2001 10,051 US NumberToDate(val({YourYYYYMMDDfield})) Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports http://www.gainfocus.biz Upvote 0 Downvote
NumberToDate(val({YourYYYYMMDDfield})) Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports http://www.gainfocus.biz
Jan 30, 2006 #6 GJParker Programmer Jul 4, 2002 1,614 GB dgillz There is no NumberToDate function in CR10 is this new to CRXI ? Gary Gary Parker MIS Data Analyst Manchester, England Upvote 0 Downvote
dgillz There is no NumberToDate function in CR10 is this new to CRXI ? Gary Gary Parker MIS Data Analyst Manchester, England
Jan 30, 2006 #7 lbass Technical User Feb 9, 2002 32,818 US Try: CDate(Val(Left({MyTable.Field},4)),Val(Mid({MyTable.Field},5,2)),Val(Right({MyTable.Field},2))) -LB Upvote 0 Downvote
Try: CDate(Val(Left({MyTable.Field},4)),Val(Mid({MyTable.Field},5,2)),Val(Right({MyTable.Field},2))) -LB