Hi,
I need some help changing the Datetime format in a Dropdown control. This is purely a cosmetic change as the code seems to work so far.
My current setup:
In the App OnStart property I have the following Sequence which generates a 30 minute incremented table based on the company opening and closing times:
Set(CompanyStartTime, TimeValue("07:30"));
Set(CompanyEndTime, TimeValue("20:00"));
Set(CompanyHours,
ForAll(
Sequence(
(CompanyEndTime+1800000-CompanyStartTime)/1800000
),CompanyStartTime-1800000 + Value*1800000
)
);
This in return saves the following table in the "CompanyHours" variable:
Using "CompanyHours" in the .Item property of a DropDown control gives me the correct values, but sadly they are in AM/PM format which I would like to change to military time (HH:mm):
I haven't found a simple way to do this, the table requires to be in DateTime for other functions within my app to work properly. AddColumns wouldn't be an option since there's function's dependent directly on the dropdown selected item.
If anyone knows a way to change the DateTimeformat or can recommend a better practice than my method I would gladly hear your input! Your help is greatly appreciated!
-Coma

Report
All responses (
Answers (