on 10-30-2017 9:10 PM
Hi there,
So I am trying to figure out a formula to convert my times to HH:MM.
So 095003 would show as 9:50
145344 would should as 14:53
If the value is 0, it should show as N/A
I've spent more time than i'd like to admit trying to figure this out so I could use some help.
Thanks!
Hi Kevin,
Is the time field's datatype number?
If yes, change the code to:
stringvar s := Right('000000'&totext({time field},'#'),6); //replace the {time field} with the correct database field
if s = '000000' then 'N/A'
Else if istime(picture(s,'xx:xx:xx')) then
totext(time(picture(s,'xx:xx:xx')), 'HH:mm')
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kevin,
Create a formula using this code:
stringvar s := {time field}; //replace this field with the correct database field
if s = '0' then 'N/A'
Else if istime(picture(s,'xx:xx:xx')) then
totext(time(picture(s,'xx:xx:xx')), 'HH:mm')
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.