Skip to content

Date Time Utils

Rahul Raveendran edited this page Jan 16, 2017 · 2 revisions

Collection of util methods to provide common formatting and stuff done on date time values.

formatDate

This method makes use of SimpleDateFormat class to format the date. You may use the exact same format string here to get the job done.

DateTimeUtils
        .formatDate(1484581597240, "dd/MM/yyyy hh:mm a", Locale.getDefault());

// output: 16/01/2016 09:16 pm
Clone this wiki locally