Here you can find the source of getDate(String date)
Parameter | Description |
---|---|
date | the date string. May be null |
private static Date getDate(String date)
//package com.java2s; /*/*from w ww .j av a 2s . co m*/ * Version: 1.0 * * The contents of this file are subject to the OpenVPMS License Version * 1.0 (the 'License'); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.openvpms.org/license/ * * Software distributed under the License is distributed on an 'AS IS' basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * Copyright 2014 (C) OpenVPMS Ltd. All Rights Reserved. */ import java.util.Date; public class Main { /** * Converts a string to date. * * @param date the date string. May be {@code null} * @return the converted date. May be {@code null} */ private static Date getDate(String date) { return date != null ? java.sql.Date.valueOf(date) : null; } }