Converts the specified object to Date type according to the following:
obj
is already a Date object
(i.e. an instance of java.util.Date
),
the function works simply as a type cast operator,
same as it would be in Java: (Date) obj
obj
is an instance of java.util.Calendar
Java class, the function returns the Calendar's current
time: ((Calendar) obj).getTime()
obj
is not null
, the function tries to parse
the string returned by call obj.toString()
as a date/time value
using the default date/time formatter (the one returned by method:
java.text.DateFormat.getDateTimeInstance()
).
If the parsing is successful, the result Date
object will be returned.
null
You may call this function in a more method-like style:
obj.toDate()