mobius1983
Technical User
Hi everyone,
I am hoping someone can help me, I have a date/time field in my database (e.g 10/06/2004 13:45). I need to create a SQL statement so that I can access the information from an asp page. But I want to use a WHERE statement to only grab fields that match today's date, so I need to only get the date part of the field, and ignore the time. Does anyone know how to format this field in a SQL statement.
e.g "select * from Date_table where FORMAT(date_field, only date) = date()"
I hope that makes sence.
Thanks to anyone that can help or point me in the right direction.
Nick.
I am hoping someone can help me, I have a date/time field in my database (e.g 10/06/2004 13:45). I need to create a SQL statement so that I can access the information from an asp page. But I want to use a WHERE statement to only grab fields that match today's date, so I need to only get the date part of the field, and ignore the time. Does anyone know how to format this field in a SQL statement.
e.g "select * from Date_table where FORMAT(date_field, only date) = date()"
I hope that makes sence.
Thanks to anyone that can help or point me in the right direction.
Nick.