formatAsDate

open fun formatAsDate(date: String): Date

This method is used to format a string-date as date

Return

the string-date value formatted as Date

Parameters

date

: the string-date value to format


open fun formatAsDate(date: String, pattern: String): Date

This method is used to format a string-date as date

Return

the string-date value formatted as Date

Parameters

date

: the string-date value to format

pattern

: pattern to format the return date e.g. dd/MM/yyyy hh:mm:ss


open fun formatAsDate(date: Long): Date

This method is used to format a timestamp value as date

Return

the timestamp value formatted as Date

Parameters

date

: the timestamp value to format


open fun formatAsDate(date: Long, pattern: String): Date

This method is used to format a timestamp value as date

Return

the timestamp value formatted as Date

Parameters

date

: the timestamp value to format

pattern

: pattern to format the return date e.g. dd/MM/yyyy hh:mm:ss