date time stamp

jamesd

Board Regular
Joined
Sep 22, 2003
Messages
220
I have a linked table that has a date field with date and time.
how can i search by day. IE if i want data for only one day i have to put in between dd/mm/yyyy 00:01 and dd/mm/yyyy 23:59 .
What i want to be able to do is just enter dd/mm/yyyy?
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

VicRauch

Well-known Member
Joined
Mar 23, 2006
Messages
2,032
In the field area of the query grid, you can change the date/time of the field to just a date with this expression.

MyNewDateOnly: DateSerial(Year(MyOriginalDateField), Month(MyOriginalDateField), Day(MyOriginalDateField))

HTH,
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
66,124
Office Version
  1. 365
Platform
  1. Windows
The DateValue function also seems to work on this:

MyNewDateOnly: DateValue([MyOriginalDateField])

Then, you can put your date criteria on this new field.
 

Forum statistics

Threads
1,181,607
Messages
5,930,881
Members
436,764
Latest member
avalladarez

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top