Return the date in a specified format or the default format.
Syntax
public String toString() public String toString(String format) public String toString(String format boolean twelveHr)
Parameters
Return values
A string containing the date information, such as:
19990930 053029 PM
Regardless of the format of the month position, the output string is always a 2 character integer representation (that is, 01 for January, 12 for December, and so forth).
Exceptions
DtpDateException - When the date format is invalid.
Examples
try { DtpDate toDay = new DtpDate(); String date = toDay.toString("Y/M/D h:m:s"); } catch ( DtpDateException date_e ) { System.out.println(date_e.getMessage()); }