Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-07-2018, 12:15 PM
kingmb kingmb is offline How to filter between two dates in MS Query criteria when the dates are text ("20180903", etc.) Windows 10 How to filter between two dates in MS Query criteria when the dates are text ("20180903", etc.) Office 2016
Novice
How to filter between two dates in MS Query criteria when the dates are text ("20180903", etc.)
 
Join Date: Sep 2018
Posts: 1
kingmb is on a distinguished road
Default How to filter between two dates in MS Query criteria when the dates are text ("20180903", etc.)

In MS Query I have a filter in the criteria that looks like this: >='20180903' And <='20181019'. (The dates in this field are text instead of date format, yyyymmdd)

I want to change it from the above to: >=[enter start date] And <=[enter end date] (or an equivalent), but apparently because of the text format it returns an error message.



Suggestions? Thanks for any help you can provide.
Reply With Quote
  #2  
Old 09-07-2018, 11:59 PM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline How to filter between two dates in MS Query criteria when the dates are text (&quot;20180903&quot;, etc.) Windows 7 64bit How to filter between two dates in MS Query criteria when the dates are text (&quot;20180903&quot;, etc.) Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,766
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Hi and welcome
any chance of changing the fields to real dates ( data - text to columns - Delimited - Next - Next - Check " Date" - Select YMD from dropdown - Finish) ?
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #3  
Old 09-11-2018, 01:08 AM
ArviLaanemets ArviLaanemets is offline How to filter between two dates in MS Query criteria when the dates are text (&quot;20180903&quot;, etc.) Windows 8 How to filter between two dates in MS Query criteria when the dates are text (&quot;20180903&quot;, etc.) Office 2016
Expert
 
Join Date: May 2017
Posts: 869
ArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud of
Default

In source are string values instead of dates?

I'm not sure without testing it out, does MS Query use worksheet or VBA syntax in formulas, so you try either
...>= TEXT([enter start date], "yyyymmdd") AND ... <= TEXT([enter end date], "yyyymmdd")
or
...>= FORMAT([enter start date], "yyyymmdd") AND ... <= FORMAT([enter end date], "yyyymmdd")
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
X axis graph all dates when date column contains specific dates..possible ? DBenz Excel 2 03-28-2018 04:59 AM
How to filter between two dates in MS Query criteria when the dates are text (&quot;20180903&quot;, etc.) The "body of text" for all odd-numbered pages are all "vertically-centered-aligned". keepcalmandreadabook Word 5 03-27-2017 04:08 PM
Google "=Filter()" function excel equivalent. Sadodare Excel 0 08-01-2016 11:15 AM
Formula for filter "Incomplete Tasks for User..." patrickd123 Project 1 04-07-2015 08:15 AM
How to filter between two dates in MS Query criteria when the dates are text (&quot;20180903&quot;, etc.) Filter 2 columns between 2 dates s_samira_21 Excel 2 02-08-2015 10:34 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:36 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft