Java SQL Date Get getDate(final String value)

Here you can find the source of getDate(final String value)

Description

get Date

License

Open Source License

Declaration

private static Timestamp getDate(final String value) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.sql.Timestamp;

import java.util.Calendar;

public class Main {
    private static Timestamp getDate(final String value) {
        if (value.equalsIgnoreCase("NOW"))
            return new Timestamp(Calendar.getInstance().getTime().getTime());
        else//w  ww .java  2s  .  c o  m
            return Timestamp.valueOf(value);
    }
}

Related

  1. getDate()
  2. getDate(Calendar pCal)
  3. getDate(Date date)
  4. getDate(Date value)
  5. getDate(final int year, final int month, final int day)
  6. getDate(Map m, String key)
  7. getDate(Object object)
  8. getDate(Object value)
  9. getDate(Object value, int columnType)