DatabaseServices.makeJDBCDateString

Creates a SQL escape string for a date in the format {d 'yyyy-mm-dd'}. This can be used in conjunction with the #executeGenericUpdateStatement(String, String) or #executeSelectStatement(String, String, SelectStatementCallback) methods;

Example 1:

 var d1 = new Date();
 var stmt = "update orders set order_date = " 
    + services.database.makeJDBCDateString(d1) 
    + " where order_id = " + orderId; 
 services.database.executeGenericUpdateStatement("SAMPLES", stmt); 
 
Example 2:
 var dbs = services.database;
 var d2 = new Date(fields.orderDate.value);
 var stmt = "select * from orders where order_date >= "
    + dbs.makeJDBCDateString(d2); 
 dbs.executeSelectStatement("SAMPLES", stmt, function (columnData) {..}); 
 

returns java.lang.String

Parameters

java.util.Date  date,