Forum Discussion
kregggower
Jan 17, 2023Copper Contributor
date convertion (s)
need help converting a date formatted 20230117093739 YYYYMMDDHHMMSS to 01/17/2023 (in one cell) 9:37:39 AM (in the next cell). i normally use this mid string Date: Mid([INB_DATE_TIME],5,2) & "/" & ...
Jan 18, 2023
Hi,
Usually such a "type mismatch" happens when there are empty values in some records. If that's the case in your data then you can try to exclude empty values:
NewDate: IIf(Not IsNull([INB_DATE_TIME]),cdate(Mid([INB_DATE_TIME],5,2) & "/" & Mid([INB_DATE_TIME],7,2) & "/" & Mid([INB_DATE_TIME],1,4)))
Servus
Karl
****************
Access Bug Trackers
Access News
Access DevCon
kregggower
Jan 18, 2023Copper Contributor
Karl,
Thank you for the reply The "IIf(Not IsNull([INB_DATE_TIME])" really helped clean up the data in the table Thank You! and is shows the date in the query if i run it with out filters "DATE()" but if i use the "DATE()" or "DATE()+1" in the Criteria field no dates are returned the out put query is blank, like there is no matching dates?
Thank you for the reply The "IIf(Not IsNull([INB_DATE_TIME])" really helped clean up the data in the table Thank You! and is shows the date in the query if i run it with out filters "DATE()" but if i use the "DATE()" or "DATE()+1" in the Criteria field no dates are returned the out put query is blank, like there is no matching dates?