Available in:
Apps (win)
Apps (char)
Reportwriter
RPC
Standalone PL
X
X
X
X
X
datetime to_date(data[,format]) expr data string format
data | specifies the expression to convert.
|
format | (optional) specifies a mask. If none is provided, a default conversion is performed. Refer to the VORTEX Installation and Usage Guide for the valid formats. |
field = to_date(G.TIME,"DD/MM/YY");
{ list t1; char td1[25]; char td2[25]; datetime dd1; datetime dd2; /****************************************************************/ /* Pass datetime variable into SELECT statement for Rdb */ /****************************************************************/ dd1 = to_date("01-FEB-1992 00:00:00","DD-MON-YYYY HH:MI:SS"); dd2 = to_date("15-FEB-1992 00:00:00","DD-MON-YYYY HH:MI:SS"); /* ----- ship_dt is DATE type of Rdb ----- */ t1 = list_open("SELECT custid,ship_dt FROM tk_ship WHERE ship_dt BETWEEN " " '" ^^ to_char(dd1,"DD-MON-YYYY HH:MI:SS") ^^ "' and " " '" ^^ to_char(dd2,"DD-MON-YYYY HH:MI:SS") ^^ "' ",1000); list_view(t1,0); /***************************************************************/ /* Hard code data into SELECT statement for Rdb */ /***************************************************************/ t1 = list_open("SELECT custid,ship_dt FROM tk_ship WHERE ship_dt BETWEEN " " '" ^^ "01-FEB-1992 00:00:00.00" ^^ "' and " " '" ^^ "15-FEB-1992 00:00:00.00" ^^ "' ",1000); list_view(t1,0); }