How to store a unformatted Time in a Date datatype

I have a datatype where I want to store Start and End Times, I know I can only store time as date
I have a dropdown of times people can chose

How do I go about converting these and storing it

Thanks for help :slight_smile:

You need to store them as Hour (number) and Minute (number) and Hour (text) and Minute (text). Then the text ones can have the leading zeroes like proper time format.

1 Like

Actually, I get the explanation thanks for the help :slight_smile: )

Yea an Option set would be good with the Display being 00:00, 01:00 like you have now. But then add a new attribute (number) with the hour value and another attribute for the minute value.

Then when they pick the option you can set the database hour field to the dropdown’s value’s hour attribute etc.

Oops looks like you figured it out

This topic was automatically closed after 70 days. New replies are no longer allowed.