time()

Read(1150) Label: convert, time data,

Description:

Convert a string or integer to time data.

Syntax:

time(stringExp)

Convert string string into time value according to system-defined datetime format; return null if the conversion fails

time(stringExp{, format}:loc)

Convert the string stringExp to time data type according to the format specified by format and return null if the conversion fails. If there is no parameter format, format of stringExp must be in consistent with the time format in the configuration information. Parameter loc is the language used in stringExp; default is the system language

time(h,m,s)

Convert h,m,s of integer type to time data

Note:

The function converts the string stringExp or integers h,m,s to time data.

Parameter:

stringExp

A string

format

A string specifying data format

loc

Language name, which is case insensitive. The most commonly used languages are Chinese (zh) and English (en); see A.sort() to know other languages supported in esProc

h

Integer

m

Integer

s

Integer

Return value:

Time

Example:

time("00:00:45")

00:00:45

time("00/00/45","HH/mm/ss")

00:00:45

time(12,13,00)

12:13:00

time("1:08 PM","h:mm a":"en")

13:08:00

Related function:

datetime()

date()

date(datetimeExp)

datetime(datetimeExp)

time(datetimeExp)