convertDateToString
	String sutil.convertDateToString ( Date date ) (professional and enterprise editions only)
String sutil.convertDateToString ( Date date, String format ) (professional and enterprise editions only)
String sutil.convertDateToString ( Date date, String format ) (professional and enterprise editions only)
Description
Converts the Date given to a string in a specified format, or in the "MM/dd/yyyy HH:mm:ss.SS zzz" if no format is given.
Parameters
- date The date to convert
 - format (optional) A String representation (as a SimpleDateFormat) for the output
 
Return Values
A String representing the date given
Change Log
| Version | Description | 
|---|---|
| 5.5.26a | Available in all editions. | 
Examples
// Log the current time
Date now = new Date();
session.log(sutil.convertDateToString(now, "MM/dd/yyyy HH:mm:ss zzz"));
Date now = new Date();
session.log(sutil.convertDateToString(now, "MM/dd/yyyy HH:mm:ss zzz"));
      mikes on 10/26/2011 at 5:35 pm
  
    
          
      
- Printer-friendly version
 - Login or register to post comments
 
