Problem updating with datetime column

  • I have a table with a column "DATE" of datetime type. I'm using Delphi 7 and SQL SERVER 2000

    I need to update a row of this table only with the same date. It doesn't matter the time part of the datetime. The problem with the following sentence is that no update the row.

     

    UPDATE informe_registraciones SET hora' + inttostr(i) + '=''' + datetimetostr(nueva_fechahora) + '''WHERE fecha LIKE ''' + datetostr(nueva_fechahora) + '''AND tarjeta=' + inttostr(nueva_tarjeta));

    The red text must be in other way to select only the date ('03/30/2005') of the datetime i want ?? Thanks and Sorry for my english. Mauro

     

     

  • I am guessing that "datetostr" is a UDF.  If so, can you give us the code?

    Thanks

    I wasn't born stupid - I had to study.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply