ORSELECT tblNoticias.No_IdFROM tblNoticiasWHERE tblNoticias.No_InputFecha = DateAdd(hh, -DatePart(hh, getDate()), DateAdd(mi, -DatePart(mi, getDate()), DateAdd(s, -DatePart(s, getDate()), dateadd(ms, -DatePart(ms, getDate()), getDate()))));
This will subtract miliseconds, then seconds, then minutes, then hours from the current date to just get the date. This is not as clean and readable as James' Post.orSELECT tblNoticias.No_IdFROM tblNoticiasWHERE tblNoticias.No_InputFecha = convert(char(10), getdate(), 101)
convert(char(10), getdate(), 101) will return just the dateportion to you. If you are storing the times as well in the db then you will need to use the dartpart functionality as described by JamesT