DatabaseServices.makeJDBCDateStringFromField

Creates a SQL escape string in the format {d 'yyyy-mm-dd'} from a form field of type Date, DateTime or Time. This can be used in conjunction with the #executeGenericUpdateStatement(String, String) or #executeSelectStatement(String, String, SelectStatementCallback) methods;

Example:

 var stmt = "update orders set order_date = "
    + services.database.makeJDBCDateStringFromField(fields.orderDate) 
    + " where order_id = " + orderId; 
 services.database.executeGenericUpdateStatement("SAMPLES", stmt); 
 

returns java.lang.String

Parameters

Field field,