If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Date format in query
Hello -
I have a date column that is populated with "Now()" (Date and time). I want to write a query that Deletes all records where the date is today's date and certain fields are blank; in other words, strip the time off of the DateTime column and only use the date. How do I do that? -- Sandy |
#2
|
|||
|
|||
Date format in query
Sandy wrote:
I have a date column that is populated with "Now()" (Date and time). I want to write a query that Deletes all records where the date is today's date and certain fields are blank; in other words, strip the time off of the DateTime column and only use the date. Use the DateValue function to extrace the date from a date/time value. DELETE * FROM thetable WHERE DateValue(datefield) = Date() AND thisfield Is Null AND thatfield Is Null -- Marsh MVP [MS Access] |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Running Average | cutthroatjess | Running & Setting Up Queries | 17 | December 19th, 2005 07:52 PM |
Date format in crosstab query | Matt | Running & Setting Up Queries | 3 | September 12th, 2005 07:32 AM |
DATE FORMAT in crosstab query | Mary | Running & Setting Up Queries | 2 | February 18th, 2005 03:31 PM |
Here's a shocker | Mike Labosh | General Discussion | 2 | October 26th, 2004 05:04 PM |
Aggregating Date Data into Weeks and Quarters | Roger | Running & Setting Up Queries | 3 | July 11th, 2004 05:56 PM |