Skip to main content

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:

 

Minute calculation

 

How do I change it so that it shows 7:00, 8:00, 9:00, etc.

 

Thanks

7 answers
  1. Jun 13, 2019, 7:49 PM

    Richard,

     

    Please use:

     

    Str(Datepart('hour',[Event Start]))+":"+

    (IF STR(Datepart('minute',[Event Start]))='0' THEN '00' ELSE

    STR(Datepart('minute',[Event Start])) END)

     

    Richard, Please use: Str(Datepart('hour',[Event Start]))+

     

    Hope it helps.

     

    Michael Ye

0/9000