Here you can find the source of toIsoString(Calendar value)
public static String toIsoString(Calendar value)
//package com.java2s; /**// w w w .j a va 2 s . com * * Copyright (c) 2016 Fannie Mae, All rights reserved. * This program and the accompany materials are made available under * the terms of the Fannie Mae Open Source Licensing Project available * at https://github.com/FannieMaeOpenSource/ezPie/wiki/License * * ezPIE? is a registered trademark of Fannie Mae * */ import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; public class Main { protected static SimpleDateFormat _sdfISO = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); public static String toIsoString(Date value) { return (value == null) ? "" : _sdfISO.format(value); } public static String toIsoString(Calendar value) { return (value == null) ? "" : toIsoString(value.getTime()); } }