public String createTimestamp ( ) { Date date = new Date ( ) ; //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd H:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat ( "yyyy-MM-dd'T'HH:mm:ssZ" ) ; String formattedDate = sdf . format ( date ) ; return formattedDate ; }
Returns current timestamp .