PureConnect

 View Only
Discussion Thread View
  • 1.  SQL and Handler Datetime (newbie)

    Posted 03-08-2010 22:51
    Hello, I have created sql table with 2 columns...one date&time and other is numeric. When i add date to date&time column in SQL it always adds time of "12:00:00 AM" automatically (this is sql default and cannot be changed). So when i write my "Where" statement in the Handler it keeps failing because it compares the TIME...I have tried the following expressions: "dtDateTime=" & SQLStr(DateStrUTC($Now)) "dtDateTime=" & SQLStr($Now) "dtDateTime=" & (DateStrUTC($Now)) Can anyone help with which step i should be using? thank you, Bal


  • 2.  RE: SQL and Handler Datetime (newbie)

    Posted 03-09-2010 12:59
    How are you doing the insert into the database? Are you using handlers or attendant? If you are using handlers you might want to write a stored procedure to do the actual insert as I know I have gotten a full date time into a database when using a stored procedure.


  • 3.  RE: SQL and Handler Datetime (newbie)

    Posted 03-11-2010 12:22
    Just change WHERE statement: e.g. DATEDIFF(day, dtDateTime, GETDATE())=0


Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources