All templates
Date & TimeBeginner
Get Current Time
Robomotion•Updated 9 months ago

Overview
Reads the local date and time and formats it as a long time string (HH:mm:ss). Displays the result in an information dialog so you can verify the system clock at a glance.
Get Current Time
Creating and handling datetime values are vital for time-related operations, such as generating logs. Robomotion provides various nodes to create, convert and manipulate datetime values.
What Get Current Time can do
Robomotion.DateTime.Now(optLayout: 'RFC3339',optTimezoneOffset: 'Local') →msg.current_date_time.Robomotion.DateTime.Formatconvertsmsg.current_date_timeusingoptCustomOutLayout: '15:04:05'→msg.long_time.Core.Programming.Functioncomposesmsg.dialog_text = 'It is ' + msg.long_time + ' currently.'.Core.Dialog.MessageBoxtitledTime right now(typeinfo) displaysmsg.dialog_text, thenCore.Flow.Stop.
Behind the scenes
- The Format node uses an explicit Go-style layout
15:04:05rather than a named enum, so the output is deterministic across machines and locales instead of varying with the host's regional settings. optTimezoneOffset: 'Local'anchors the timestamp to the robot's clock, matching user expectations when the dialog is displayed interactively; switch to'UTC'for logs and audit trails.
More date & time templates
See all 6 →- Convert Datetime to TextConverts a datetime value into a formatted text string using the Robomotion DateTime package. Demonstrates standard and custom output layouts for logging, filenames, and reports.
- Convert Text to DatetimeParses a text string like "2025-05-01 09:30:00" into a true datetime value the flow can work with. Shows how to declare an input layout so downstream nodes can format or compare the date.
- Days of Your LifeCalculates how many days you have been alive by subtracting your birthday from today. Uses DateTime Now, Subtract, and a Function node to produce a clean day count.
- Get First Working Day of the Next MonthComputes the first business day of next month, skipping weekends. Useful for scheduling invoices, reports, or reminders that must fire on a working day.
- Get Previous Working DateWalks backwards from today to find the previous working day, handling weekends through conditional logic. A building block for backdated reports or audits.