Time Format - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: Time Format (/showthread.php?tid=4440) |
Time Format - tomnord - 12.12.2022 Hello, could anybody tell me how to format LM time to this format and vise versa? Code: /Date(1670926903419+0100)/ RE: Time Format - admin - 12.12.2022 It's a timestamp in milliseconds with timezone. Current date/time to string conversion: Code: tz = os.date('%z') Convert string to date/time: Code: str = '/Date(1670926903419+0100)/' RE: Time Format - tomnord - 12.12.2022 (12.12.2022, 10:36)admin Wrote: It's a timestamp in milliseconds with timezone. Thanks! And if I wanted to at for example 24h to the "str" string, to use as a from-to range? RE: Time Format - admin - 12.12.2022 You can add 86400 to ts variable. |