Here you can find the source of formatAsCassandraDate(Date date)
Parameter | Description |
---|---|
date | a parameter |
public static String formatAsCassandraDate(Date date)
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static final String ISO8601_DATE_ZONE = "yyyy-MM-ddZ"; /**/*from ww w . j ava 2 s . c o m*/ * Formats as a date only string * @param date * @return */ public static String formatAsCassandraDate(Date date) { SimpleDateFormat parser = new SimpleDateFormat(); parser.setLenient(false); parser.applyPattern(ISO8601_DATE_ZONE); return parser.format(date); } }