formatAsTimestamp

open fun formatAsTimestamp(date: Date): Long

This method is used to format a date value as timestamp

Return

the date value formatted as long

Parameters

date

: the date value to format


open fun formatAsTimestamp(date: String): Long

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

Return

the string-date value formatted as long

Parameters

date

: the string-date value to format


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

This method is used to format a date value as timestamp

Return

the date value formatted as long

Parameters

date

: the date value to format

pattern

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


open fun formatAsTimestamp(date: String, pattern: String): Long

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

Return

the string-date value formatted as long

Parameters

date

: the string-date value to format

pattern

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