mil.dod.th.ose.gui.webapp/src/mil/dod/th/ose/gui/webapp/utils/DateTimeConverterUtil.java
public static Long formatDateFromString(final String time)
    {
        final SimpleDateFormat format = new SimpleDateFormat(DATE_FORMAT, Locale.getDefault());
        
        format.setTimeZone(TimeZone.getTimeZone(DATE_TIME_ZONE));
        
        try
        {
            final Date date = format.parse(time);
            return date.getTime();
        }
        catch (final ParseException exception)
        {
            final FacesMessage parseMessage = new FacesMessage(FacesMessage.SEVERITY_ERROR, 
                    "Error parsing date string value", 
                    "The date value passed in " + time + " cannot be parsed because of the following reason "
                    + exception.getMessage());
            
            throw new ConverterException(parseMessage, exception);
        }
    }
/**
     * Function which takes a formatted date string and converts it to a long
     * representing the number of milliseconds from the Jan 1 1970 epoch.
     * @param time
     *  the formatted date string 
     * @return
     *  the time in milliseconds since the Jan 1 1970 epoch.
     */
Function which takes a formatted date string and converts it to a long
representing the number of milliseconds from the Jan 1 1970 epoch.
@param time
the formatted date string
@return
the time in milliseconds since the Jan 1 1970 epoch.
Function which takes a formatted date string and converts it to a long representing the number of milliseconds from the Jan 1 1970 epoch . @param time the formatted date string @return the time in milliseconds since the Jan 1 1970 epoch .
public static Long formatDateFromString(final String time)
    {
        final SimpleDateFormat format = new SimpleDateFormat(DATE_FORMAT, Locale.getDefault());
        format.setTimeZone(TimeZone.getTimeZone(DATE_TIME_ZONE));
        try
        {
            final Date date = format.parse(time);
            return date.getTime();
        }
        catch (final ParseException exception)
        {
            final FacesMessage parseMessage = new FacesMessage(FacesMessage.SEVERITY_ERROR, 
                    "Error parsing date string value", 
                    "The date value passed in " + time + " cannot be parsed because of the following reason "
                    + exception.getMessage());
            throw new ConverterException(parseMessage, exception);
        }
    }
public static Long formatDateFromString ( final String time ) { final SimpleDateFormat format = new SimpleDateFormat ( DATE_FORMAT , Locale . getDefault ( ) ) ; format . setTimeZone ( TimeZone . getTimeZone ( DATE_TIME_ZONE ) ) ; try { final Date date = format . parse ( time ) ; return date . getTime ( ) ; } catch ( final ParseException exception ) { final FacesMessage parseMessage = new FacesMessage ( FacesMessage . SEVERITY_ERROR , "Error parsing date string value" , "The date value passed in " + time + " cannot be parsed because of the following reason " + exception . getMessage ( ) ) ; throw new ConverterException ( parseMessage , exception ) ; } }
Function which takes a formatted date string and converts it to a long
 representing the number of milliseconds from the Jan 1 1970 epoch.
Function which takes a formatted date string and converts it to a long representing the number of milliseconds from the Jan 1 1970 epoch .