メインコンテンツ

DateTime Data Type Converter

Convert time points, storage data types, or time points and storage data types, of DateTime signal

Since R2024b

  • DateTime Data Type Converter block icon

Description

The DateTime Data Type Converter block converts the time point, storage data types, or time points and storage data types of a DateTime signal. To convert between time standards, use the DateTime Time Standard Converter block.

Limitations

The DateTime blocks are available only as an internal feature with early access. Their design is subject to change.

Ports

Input

expand all

DateTime signal, specified as a scalar.

Output

expand all

DateTime signal with converted time point, storage data type, or time points and storage data types, returned as a scalar.

Parameters

expand all

To edit block parameters interactively, use the Property Inspector. From the Simulink® Toolstrip, on the Simulation tab, in the Prepare gallery, select Property Inspector.

Choose the data type for the output. The type can be specified directly as Simulink.DateTimeType() or expressed as a Simulink.DateTimeType data type object:

  • Simulink.DateTimeType(Name,value)

  • Simulink.DateTimeType(datetime type name)

Programmatic Use

To set the block parameter value programmatically, use the set_param function.

To get the block parameter value programmatically, use the get_param function.

Parameter: OutDataTypeStr
Values: Simulink.DateTimeType() (default) | <data type expression>

Select the category of data to specify.

  • DateTimeSimulink.DateTimeType() data types.

  • Expression — Expressions that evaluate to data types. Selecting Expression enables a text box to the right, where you can enter the expression.

For more information, see Specify Data Types Using Data Type Assistant.

Select the time point:

  • Seconds since Unix epoch

  • Seconds since NTP epoch

  • Seconds since TAI epoch

  • Julian date

  • Modified Julian date

  • J2000.0 date

Select the DateTime storage data type:

  • double

  • int32

  • uint32

  • fixdt(0,64,32)

  • fixdt(1,64,32)

  • fixdt(0,128,64)

  • fixdt(1,128,64)

Select the DateTime time standard.

  • TAI

  • UTC

  • TAI

  • TDB

The time standard must match the time standard of the input DateTime signal.

Version History

Introduced in R2024b