ParseDate

See javadoc - uk.gov.gchq.koryphe.impl.function.ParseDate

Available since Koryphe version 1.8.0

Parses a date string

Examples

Parse date greenwich mean time plus 4 hours

date string

Java
JSON
Full JSON
Python
final ParseDate parseDate = new ParseDate();
parseDate.setFormat("yyyy-MM-dd HH:mm:ss.SSS");
parseDate.setTimeZone("Etc/GMT+4");
{
  "class" : "ParseDate",
  "format" : "yyyy-MM-dd HH:mm:ss.SSS",
  "timeZone" : "Etc/GMT+4",
  "microseconds" : false
}
{
  "class" : "uk.gov.gchq.koryphe.impl.function.ParseDate",
  "format" : "yyyy-MM-dd HH:mm:ss.SSS",
  "timeZone" : "Etc/GMT+4",
  "microseconds" : false
}
g.ParseDate( 
  time_zone="Etc/GMT+4", 
  format="yyyy-MM-dd HH:mm:ss.SSS", 
  microseconds=False 
)

Input type:

java.lang.String

Example inputs:

Input TypeInputResult TypeResult
java.lang.String2015-10-21 16:29:00.000java.util.DateWed Oct 21 20:29:00 UTC 2015
java.lang.String1985-10-26 09:00:00.000java.util.DateSat Oct 26 13:00:00 UTC 1985
java.lang.String1885-01-01 12:00:00.000java.util.DateThu Jan 01 16:00:00 UTC 1885

Parse date greenwich mean time plus 0 hours

date string

Java
JSON
Full JSON
Python
final ParseDate parseDate = new ParseDate();
parseDate.setFormat("yyyy-MM-dd HH:mm");
parseDate.setTimeZone("Etc/GMT+0");
{
  "class" : "ParseDate",
  "format" : "yyyy-MM-dd HH:mm",
  "timeZone" : "Etc/GMT+0",
  "microseconds" : false
}
{
  "class" : "uk.gov.gchq.koryphe.impl.function.ParseDate",
  "format" : "yyyy-MM-dd HH:mm",
  "timeZone" : "Etc/GMT+0",
  "microseconds" : false
}
g.ParseDate( 
  time_zone="Etc/GMT+0", 
  format="yyyy-MM-dd HH:mm", 
  microseconds=False 
)

Input type:

java.lang.String

Example inputs:

Input TypeInputResult TypeResult
java.lang.String2015-10-21 16:29java.util.DateWed Oct 21 16:29:00 UTC 2015
java.lang.String1985-10-26 09:00java.util.DateSat Oct 26 09:00:00 UTC 1985
java.lang.String1885-01-01 12:00java.util.DateThu Jan 01 12:00:00 UTC 1885

results matching ""

    No results matching ""