Date Format in Excel Query (2007) not recognized in parameters

BFLOW

New Member
Joined
Jun 10, 2011
Messages
1
Howdy all,

I've been working on a parameter issue in MS Query for some time, but have yet to find a functional solution. I found a few older threads on the subject, but none had a workable answer I could use. Basically, MS Query recognizes date formats when entered in the criteria values (as #m/d/yyyy#), but not when keyed in the parameter prompt. Ultimately I'd like to reference two min/max cells in Excel and refresh through them, but I have to get the parameters to work first. I've tried using =TEXT(J2,"YYYY/MM/DD hh:mm:ss") in the cell, as well as manually entering it in the prompt, but no dice, I keep getting the ever-so-frustrating "literal does not match format string" error. Even when I copy the date directly from the output, the error remains. Any assistance would be much appreciated.

Thanks!
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Forum statistics

Threads
1,224,587
Messages
6,179,734
Members
452,939
Latest member
WCrawford

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