problems with datetime translation

Meeting place for R&R customers and clients to share tips and ideas. Post your questions, messages or problems here.
Post Reply
gbartsch
Posts: 2
Joined: Tue Oct 10, 2017 12:44 pm

problems with datetime translation

Post by gbartsch » Mon Oct 06, 2003 2:36 pm

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

kfleming
Posts: 5795
Joined: Tue Oct 10, 2017 12:44 pm

=> problems with datetime translation

Post by kfleming » Mon Oct 06, 2003 4:35 pm

[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

Post Reply