Cannot Filter Date after changing the format forn date/time stamp

kanoor

New Member
Joined
Aug 19, 2008
Messages
5
Hi,

I'm converting a data dump date field from Date/Time stamp in a query

06.10.2010 02:42:00 using Left/Mid/Right to and concatenating to show 06/10/2010. Though I tried using Cdate to make it a date function and on properties changed it to short date, I can't get it to recognise it as a date and thus not able to filter it by date. When I put a date in the query to filter it is not doing anything and just hangs. The db has around million rows with about 10 fields.

Will greatly appreciate any help on this.

Thanks
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
To convert to a date you can use the Rpalce () liek this:

Code:
? CDate(Replace("06.10.2010 02:42:00", ".", "/"))
6/10/2010 2:42:00 AM

If you just want the date value without the time then try this:

Code:
? DateValue(Replace("06.10.2010 02:42:00", ".", "/"))
6/10/2010
 
Upvote 0
Thanks a lot. This has definitely cut down the number of step in building the query. I have rebuilt the query with the expression and is definitely quicker to browse from one end to the other end in the table view. But still when I put a select date in there its not retrieving the data for select date. Its just waiting and not even showing the query progress bar. Is it because of the volume of data. But as I said when I browse in the table to the last record its breezing past to the 1.4 Millionth record.

Many Thanks
 
Upvote 0

Forum statistics

Threads
1,223,634
Messages
6,173,477
Members
452,516
Latest member
archcalx

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
Back
Top