Main Content

DateTime

R2026b
Blocks that output and convert simulation date and time, such as DateTime Clock and DateTime Data Type Converter

Use blocks from the DateTime library to simulate models at a specific calendar date and time. The DateTime Clock block outputs the current simulation date and time using the datetime data type, and the supporting blocks convert between time points, storage data types, time standards (TAI, UTC, TT), and string formats.

DateTime signals use the MATLAB datetime object.

To add blocks from this library to your model, see Add Blocks to Models.

Blocks

DateTime Clock block iconDateTime ClockOutput current simulation calendar date and time as DateTime data type (Since R2026b)
DateTime Data Type Converter block iconDateTime Data Type ConverterConvert time points or storage data types of DateTime signal (Since R2026b)
DateTime Time Standard Converter block iconDateTime Time Standard ConverterConvert between DateTime time standards (Since R2026b)
DateTime to Calendar Time block iconDateTime to Calendar TimeConvert DateTime signal to calendar time format (Since R2026b)
DateTime to Formatted String block iconDateTime to Formatted StringConvert DateTime signal data type to formatted string (Since R2026b)
From DateTime block iconFrom DateTimeExtract value of DateTime input signal (Since R2026b)
To DateTime block iconTo DateTimeOutput DateTime signal (Since R2026b)

Tools

Library BrowserFind and add blocks to model

Topics