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 Type | Input | Result Type | Result |
---|---|---|---|
java.lang.String | 2015-10-21 16:29:00.000 | java.util.Date | Wed Oct 21 20:29:00 UTC 2015 |
java.lang.String | 1985-10-26 09:00:00.000 | java.util.Date | Sat Oct 26 13:00:00 UTC 1985 |
java.lang.String | 1885-01-01 12:00:00.000 | java.util.Date | Thu 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 Type | Input | Result Type | Result |
---|---|---|---|
java.lang.String | 2015-10-21 16:29 | java.util.Date | Wed Oct 21 16:29:00 UTC 2015 |
java.lang.String | 1985-10-26 09:00 | java.util.Date | Sat Oct 26 09:00:00 UTC 1985 |
java.lang.String | 1885-01-01 12:00 | java.util.Date | Thu Jan 01 12:00:00 UTC 1885 |