Skip to Content
0

how to make a good hour time with colon display

Aug 22, 2017 at 09:28 PM

24

avatar image
Former Member

We have in our table, the datetime is only holding the date. There is also an hour col and a minute col, there are for the appointment. the are both columns defined as number.

The hour is typically like this: 12.00 and minutes as well like 45.00

I would like make a formula that will contain '12:45'.

I tried to combine the 2 columns but it added them. ({DDB_APPT_BASE.TIME_HOUR} + {DDB_APPT_BASE.TIME_MINUTE})

I put quotes there but it just brings the name itself.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Abhilash Kumar
Aug 22, 2017 at 09:33 PM
0

Hi Paul,

Create a formula with this code:

Time({DDB_APPT_BASE.TIME_HOUR}, {DDB_APPT_BASE.TIME_MINUTE}, 00)

-Abhilash

Share
10 |10000 characters needed characters left characters exceeded
Brian Dong Aug 22, 2017 at 09:39 PM
1

Hi Paul,

You can use the Time function like:

Time ({DDB_APPT_BASE.TIME_HOUR}, {DDB_APPT_BASE.TIME_MINUTE}, 0); 

Then you can format the formula in the time format you want.

If you want it as a string, use the ToText format and concatenate the hours, colon and minutes like:

ToText ({DDB_APPT_BASE.TIME_HOUR}, 0, "", "") & ":" & ToText ({DDB_APPT_BASE.TIME_MINUTE}, 0, "", ""); 

Good luck,

Brian

Share
10 |10000 characters needed characters left characters exceeded