Here you can find the source of toDateFormat(String date)
Parameter | Description |
---|---|
date | - A string extracted from the triple's object |
Parameter | Description |
---|---|
ParseException | an exception |
private static Date toDateFormat(String date) throws ParseException
//package com.java2s; //License from project: Open Source License import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Main { /**// w w w. j av a 2 s. c om * Formats an xsd:dateTime to a JAVA object data * @param date - A string extracted from the triple's object * @return JAVA object data * * @throws ParseException */ private static Date toDateFormat(String date) throws ParseException { SimpleDateFormat sdf = new SimpleDateFormat( "yyyy-MM-dd'T'hh:mm:ss.SSS'Z'"); return sdf.parse(date); } }