Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

isdatetime

Determine if input is datetime array

Syntax

tf = isdatetime(t)

Description

example

tf = isdatetime(t) returns logical 1 (true) if t is a datetime array. Otherwise, it returns logical 0 (false).

Examples

collapse all

Define an array.

A = [datetime('now');datetime('tomorrow');datetime(2016,1,15)]
A = 3x1 datetime array
   01-Sep-2017 16:09:44
   02-Sep-2017 00:00:00
   15-Jan-2016 00:00:00

Determine if the array is a datetime array.

tf = isdatetime(A)
tf = logical
   1

Input Arguments

collapse all

Input array, specified as a scalar, vector, matrix, or multidimensional array. t can be any data type.

Introduced in R2014b

Was this topic helpful?