Java XML Date to toTimestamp(XMLGregorianCalendar xgc)

Here you can find the source of toTimestamp(XMLGregorianCalendar xgc)

Description

to Timestamp

License

Open Source License

Declaration

public static long toTimestamp(XMLGregorianCalendar xgc) 

Method Source Code

//package com.java2s;
/**/*from w  w w  .ja va2 s  . c o  m*/
 * This file is part of JEMMA - http://jemma.energy-home.org
 * (C) Copyright 2013 Telecom Italia (http://www.telecomitalia.it)
 *
 * JEMMA is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License (LGPL) version 3
 * or later as published by the Free Software Foundation, which accompanies
 * this distribution and is available at http://www.gnu.org/licenses/lgpl.html
 *
 * JEMMA is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License (LGPL) for more details.
 *
 */

import javax.xml.datatype.XMLGregorianCalendar;

public class Main {
    public static long toTimestamp(XMLGregorianCalendar xgc) {
        return xgc.toGregorianCalendar().getTimeInMillis();
    }
}

Related

  1. getGmtTimeFromXMLGregorianCalendar( XMLGregorianCalendar xgcal)
  2. getLocalTimeFromXMLGregorianCalendar( XMLGregorianCalendar xgcal)
  3. getMilliseconds(XMLGregorianCalendar xmlCalendar)
  4. getNextMonthDate(GregorianCalendar calendar)
  5. toTimestamp(XMLGregorianCalendar calendar)
  6. toTimestamp(XMLGregorianCalendar xmlDate)