Right now you are adding a “0” before the minutes, no matter the minutes value. You should check if minutes is < 10, if so add a “0” before, this way you convert 1, 2, 3 into 01, 02, 03. But don’t add a “0” if minutes is >= 10, otherwise you’ll convert 12 into 012
[code]Conditions: No conditions (always)
Actions: Do = Time(min) to global variable Minute
Do = GlobalVariableString(Minute) to the text of global variable MinuteString
Conditions: Global variable Minute is < 10
Actions: Do = “0” + GlobalVariableString(Minute) to the text of global variable MinuteString[/code]
Now the variable MinuteString has the value with the the extra “0” if needed, you can use the variable Minute in maths (because it’s a number), and use MinuteString to display it in text objects (you can’t use it for maths because it’s a string, “09” for example).
I am working on a codebase for a clock as we speak.
I will upload it here as a resource when complete.
I am aiming for the following format;
10:23AM Saturday 10th of March 2018
The reason for the format is that I live in Australia (DD/MM/YY),
but the US format is (MM/DD/YY),
so by expressing it this way, it is in an International format.
Will let you know how I go, I am a slow coder so it may take a few days for me to perfect it !