
0
Under review
Double digit month
Fredrik Johansson 3 weeks ago
in bOS Configurator / Devices
•
updated by ComfortClick Support 2 weeks ago •
3
Hi,
is it possible to always have the month as double digit?
I have an API where I read the current year/month/day and insert in the request, and it is always expecting the month to be double digit as YYYY/MM-DD.
Between October-December there is no problem but between January-September I need to insert an extra "0" in the request.
Customer support service by UserEcho
Hello Fredrik,
I'll check and see if it's a good idea to add this option into our time value. If it's ok, we'll add this type of format.
In the meantime, feel free to use my "dirty workaround" using program task.
So i've added a new integer variable, using month as reference value. Added a new string variable to save our value and then use IF value is higher or lower than 9, If =< add the 0 in our string and if it's higher, use the reference value.
So in your API, use this string variable instead of time directly.
Best regards.month_workaround.bos
Hi,
I was thinking of doing something similiar but thought I could ask first. It would be nice if there was a parameter to change between always double or single/double digit.
Hello Fredrik,
I made an internal ticket for the date/time to be converted and used like this. This will be added to our DateTime task that we implemented in the BETA releases.
The full date will be available as string value with the option to edit the format as well. Expect it in the future releases, but for the time being i'd suggest using the workaround.
Best regards.