Here you can find the source of formatAsCassandraDateTime(Date date)
Parameter | Description |
---|---|
date | a parameter |
public static String formatAsCassandraDateTime(Date date)
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static final String ISO8601_DATETIME_ZONE = "yyyy-MM-dd HH:mm:ssZ"; /**/* ww w . j av a 2 s .c o m*/ * Formats as a date time string till mins * @param date * @return */ public static String formatAsCassandraDateTime(Date date) { SimpleDateFormat parser = new SimpleDateFormat(); parser.setLenient(false); parser.applyPattern(ISO8601_DATETIME_ZONE); return parser.format(date); } }