Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2024.1.0 - Português


NaT

Not a Time function used to create empty datetime

Syntax

dt = NaT()
dt = NaT(x)
dt = NaT(m, n)
dt = NaT(..., "OutputFormat", str)

Arguments

x

scalar, vector, matrix

m, n

scalars

str

date format for display, string

dt

datetime

Description

NaT() returns an empty datetime, i.e datetime("") returns a NaT. The NaT function can be used to allocate matrix of datetime.

NaT() is equivalent to NaT(1,1) and returns a NaT (datetime value).

NaT(x) returns a NaT matrix with the same size as x.

NaT(m, n) creates a m x n NaT matrix.

NaT(..., "OutputFormat", str) creates a datetime matrix of NaT values where the display format is specified.

Examples

NaT()
NaT(1)
dt = NaT(3, 3)
dt(1:4:9) = datetime(2022, 1, 1)

// with outputformat
dt2 = NaT(2, 2, "OutputFormat", "dd/MM/yyyy");
dt2([1 4]) = datetime("2022-12-31")

See also

  • datetime — create points in time
  • isnat — check if a variable contains "Not a Time" values

History

VersãoDescrição
2024.0.0 Introduction in Scilab.
Report an issue
<< isnat Data e Hora now >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Jun 17 17:53:24 CEST 2024