yyyymmdd
Convert date values to numeric yyyymmdd calendar dates.
📝Syntax
n = yyyymmdd(t)
📥Input Arguments
Parameter Description
inputs datetime values, serial date numbers, or date-compatible input.
📤Output Arguments
Parameter Description
output A double array where each date is encoded as year*10000 + month*100 + day.
📄Description

Convert date values to numeric yyyymmdd calendar dates.

yyyymmdd is useful for compact sortable date keys when time-of-day information is not needed.

Array-valued inputs keep their data shape when the operation supports arrays. Scalar operands are expanded where the implementation defines scalar expansion.

💡Examples
Basic usage.
yyyymmdd(datetime(2024, 5, 17))
🔗See Also
datetimeduration
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub