Here you can find the source of extractXsdDatetime(String string)
Parameter | Description |
---|---|
string | A XsdDatetime represented as a java.lang.String . |
public static long extractXsdDatetime(String string)
//package com.java2s; // it under the terms of the GNU Lesser General Public License as published by import javax.xml.bind.DatatypeConverter; public class Main { /**/*from w w w . j av a2s. c om*/ * Extracts the timestamp of a XsdDateTime string. * @param string A XsdDatetime represented as a {@link java.lang.String}. * @return A timestamp. */ public static long extractXsdDatetime(String string) { return DatatypeConverter.parseDateTime(string).getTimeInMillis(); } }