Page 1 of 1
problems with datetime translation
Posted: Mon Oct 06, 2003 2:36 pm
by gbartsch
I need to send to the database in the SQl string for datetime the following: ^mm-dd-yyyy 00:00:00^ but the R&R SQL translate it to YYYY/MM/DD. How can I tell the progtama to use ts ^12-15-2002 00:00:00^?______example with copy and past:____select__ APELLIDOPATERNO, APELLIDOMATERNO, NOMBREPRIMER, FECHAINGRESO__ from __PERSONAL PERSONAL __where (PERSONAL.FECHAINGRESO >= {ts ^2002-01-01 00:00:00^}) ´____it^s results in th following error:____DB acces: Dynamic SQL Error__SQL error code= -104__Token unknown _ line 1, char 130__^2002-01-01 00:00:00____Best regards____Gerardo Bartsch
=> problems with datetime translation
Posted: Mon Oct 06, 2003 4:35 pm
by kfleming
[updated:LAST EDITED ON Oct-06-03 AT 04:39 PM (EST)]You can edit the file RSWSQL.INI that is in the R&R program directory to change how date and datetime literals are expressed.____Towards the bottom of the file you will see:__;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;__;;; ;;;__;;; ODBC section translation rules ;;;__;;; ;;;__;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;__ODBC__; literals__DateFormat = {d ^%yyyy-%mm-%dd^}__DatetimeFormat = {ts ^%yyyy-%mm-%dd %h:%m:%s^}__TimeFormat = {t ^%h:%m:%s^}______You would change the DatetimeFormat line. Note that the line above that says ODBC is surrounded by brackets in the actual file.____Kathleen__R&R Support