temporalParse#

swordfish.function.temporalParse()#

Convert a string with specified format to a DolphinDB temporal data type. Return NULL if it cannot decide on the data type.

DolphinDB has the following temporal formats:

Format

Meaning

Range of value

yyyy

year (4 digits)

1000-9999

yy

year (2 digits)

00-99. (00-39: 2000-2039; 40-99: 1940-1999)

MM

month in year

1-12

MMM

month in year

JAN, FEB, … DEC (case insensitive)

dd

day in month

1-31

HH

hour in day

0-23

hh

hour in AM/PM

0-11

mm

minute in hour

0-59

ss

second in minute

0-59

aa

AM/PM marker

AM, PM. (case-insensitive)

SSS

millisecond

0-999

nnnnnn

microsecond

0-999999

nnnnnnnnn

nanosecond

0-999999999

Parameters:
  • X (Constant) – A string scalar/vector to be converted to temporal data types.

  • format (Constant) – A string indicating a temporal format.