powered by
Cast date with time
types.castDatetime(format = "%Y-%m-%dT%H:%M:%SZ", value)
available options are "default", "any", and "<pattern>" where
default
An ISO8601 format string e.g. YYYY-MM-DDThh:mm:ssZ in UTC time
any
As for types.castDate
types.castDate
<pattern>
datetime to cast
Types and formats specifications, strptime, DateTimeClasses, parsedate-package and lubridate-package.
strptime
DateTimeClasses
parsedate-package
lubridate-package
types.castDatetime(format = "default", value = "2014-01-01T06:00:00Z") types.castDatetime(format = "%d/%m/%y %H:%M", value = "21/11/06 16:30")
Run the code above in your browser using DataLab