How do I select the date portion of a datetime field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to query a database from excel to return unique
records by date only from a date time field. I can select
day , Month or year what I need is mm/dd/yyy

Any suggestion
Thank
 
Hi Ray
try
=DATE(YEAR(A1),MONTH(A1),DAY(A1))
where A1 stores your datetime value
Frank
 
MS Query returns DATE is not a valid function

-----Original Message-----
Hi Ray
try
=DATE(YEAR(A1),MONTH(A1),DAY(A1))
where A1 stores your datetime value
Frank



.
 
Hi Ray
I would create a helper cell with this formula and reference this
helper cell instead of the original cell in MS Query

HTH
Frank
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top