
Hi,
I am trying to separate the time from a datetime. I went ahead with this calculation:
Str(Datepart('hour',[Event Start]))+":"+STR(Datepart('minute',[Event Start]))
However, it is showing some times as the following:
How do I change it so that it shows 7:00, 8:00, 9:00, etc.
Thanks
7 answers
Richard,
Please use:
Str(Datepart('hour',[Event Start]))+":"+
(IF STR(Datepart('minute',[Event Start]))='0' THEN '00' ELSE
STR(Datepart('minute',[Event Start])) END)
Hope it helps.
Michael Ye