View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
jrv jrv is offline
external usenet poster
 
Posts: 7
Default Can Database Function Criteria be a Date?

Yes I did mean greater than 1/1/2007. However, It doesn't seem to work.
Here's what I did to check.

I created a simple database with "Date" as the first column and "Check" As
the second column (= to all 1s). I populated dates in the date column in the
syntax mm/dd/yy. I then established a criteria array with one column two
rows, First row is labeled Date. In the second row I typed the criteria as
you show below (i.e. ="2007-01-01"). When I hit enter the cell shows
2007-01-01. However, the cell with the Database Function shows the #VALUE!

error.

Any suggestions?

"Peo Sjoblom" wrote:

If you mean greater than 1/1/2007?

="2007-01-01"

or

=""&TEXT(DATE(2007,1,1),"yyyy-mm-dd")

or


=""&DATE(2007,1,1)


or

="1/1/07"


I would advice against the latter 2, the first of those will display the
serial number of the date and the latter will fail if moved to another
regional setting


--


Regards,


Peo Sjoblom



"jrv" wrote in message
...
Can the criteria for a database function be in the form of a Date (e.g.
1/1/07). If so how?