Passing dates as criteria in queries

TraceyB

New Member
Joined
Jul 8, 2008
Messages
2
I am trying to use Excel to create criteria for a query
one of my criteria is a date;
I have at present the following formulae in the cell:
="[Response History.ResponseDate] = "&C1&C6&C1
Where cell C1 contains quote marks "
and Cell C6 contains a date "10/12/2007" (picked by user from a picklist)

the formulae returns the following value:
[Response History.ResponseDate] = "39426"

when what I really need it to return is:
[Response History.ResponseDate] = "10/12/2007"
so that I can use it with my software addin to pull back required data from the datasource.

can anyone assist with me getting the value i need please
I am happy to build any functions into VBA code if it is not possible in just excel formulae.

Thanks in advance :)
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
removed original post -- not VBA.

You could try

=CHAR(34)&TEXT(C6,"DD/MM/YYYY")&CHAR(34)
 
Last edited:
Upvote 0
Thank you, this is just what I was looking for
I have spent hours on this today and have tried everything except this!!!
thanks again
Tracey
 
Upvote 0

Forum statistics

Threads
1,214,399
Messages
6,119,279
Members
448,884
Latest member
chuffman431a

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