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) & "/" & ...
kregggower
Jan 18, 2023Copper Contributor
arnel_gp,
Thank you for you reply. but i've just starting to look into VB language and it may as well be Hieroglyphics. it is over my head (for now). but thank you very much for your input.
Thank you for you reply. but i've just starting to look into VB language and it may as well be Hieroglyphics. it is over my head (for now). but thank you very much for your input.
arnel_gp
Jan 24, 2023Iron Contributor
Instead of bunch of Mid, you can simply use this.
to Return date:
IIF(IsNull([INB_DATE_TIME]),[INB_DATE_TIME],CDate(Format(Left([INB_DATE_TIME],8),"@@@@-@@-@@")))
To return the Time:
IIF(IsNull([INB_DATE_TIME]),[INB_DATE_TIME],CDate(Format(Right([INB_DATE_TIME],6),"@@:@@:@@")))