logo

Can Database Function Criteria be a Date?

jr posted on Thursday, October 11, 2007 4:57 PM

Can the criteria for a database function be in the form of a Date (e.g.
reply


If you mean greater than 1/1/2007?

Peo Sjoblom posted on Thursday, October 11, 2007 5:04 PM

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
reply

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

jr posted on Thursday, October 11, 2007 5:21 PM

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
error.

Any suggestions?
reply

I fixed the #Value!

jr posted on Thursday, October 11, 2007 5:29 PM

I fixed the #Value! error.  However, DSUM is returning 0 on check eventhough
there are dates that meet the criteria.
reply

What's the formula you are using, it certainly works for me if I create the

Peo Sjoblom posted on Thursday, October 11, 2007 5:49 PM

What's the formula you are using, it certainly works for me if I create the
same, assuming you want to sum all checks with dates greater than 01/01/07

=DSUM(DataBase,"Check",E1:E2)

or to count the dates

=DCOUNT(DataBase,"Dates",E1:E2)

the D functions don't work if the source workbook is closed if you have the
formula in another workbook


--


Regards,


Peo Sjoblom
reply

Try=ISTEXT(cell)on both the dates and the check values, if they are imported

Peo Sjoblom posted on Thursday, October 11, 2007 5:52 PM

Try

=ISTEXT(cell)

on both the dates and the check values, if they are imported they may have
trailing/leading spaces



--


Regards,


Peo Sjoblom
reply

I was using the DSUM formula you show below. It's just not working for me.

jr posted on Thursday, October 11, 2007 6:14 PM

I was using the DSUM formula you show below.  It's just not working for me.
There must be something different. Is there anyway you can send me your
reply

Sure, post your email address but do it so no spambots can get a hold of itso

Peo Sjoblom posted on Friday, October 12, 2007 12:17 AM

Sure, post your email address but do it so no spambots can get a hold of it

so if your email address is

johndoe@yahoo.com

post it like

johndoeNOSPAMatNOSPAMyahoo.com

and I will send you a little sample


--

Regards,

Peo Sjoblom
reply

Can Database Function Criteria be a Date?

jr posted on Friday, October 12, 2007 6:56 AM

Thanks a ton.

john.NOSPAMr.voiNOSPAMt@delNOSPAMphi.com

jrv
reply

I just sent you an email with a sample workbook attached-- Regards,Peo

Peo Sjoblom posted on Friday, October 12, 2007 10:13 AM

I just sent you an email with a sample workbook attached


--


Regards,


Peo Sjoblom
reply

 

Didn't Find The Answer You Were Looking For?

View Excel Worksheet Posts   Ask A New Question

EggHeadCafe has experts online right now that may know the answer to your question.  We pay them a bonus for answering as many questions as they can.  So, why not help them and yourself by becoming a member (free) and ask them your question right now?
Ask Question In Live Forum

If you have an OpenID and do not want to become a member of the EggHeadCafe forum, you can also sign on to Chat Chaos and post your question to our real time Silverlight chat application.
Ask Question In Chat Chaos

Previous Excel Worksheet conversation.

Developer Outlook AddIns    Excel    Excel Charting    Excel Crashes GPFs    Excel Miscellaneous    Excel New Users    Excel Programming    Excel Setup    Excel Worksheet    Groove    MAC Office    MAC Office Entourage    MAC Office Word    Office Communicator    Office Developer Automation    Office COM Add-Ins    Office Developer Other    Office Outlook Forms    Office Outlook VBA    Office Developer VBA    Office Miscellaneous    Office Setup    Office Templates Misc    Office Update    One Note    Outlook    Outlook BCM    Outlook Calendaring    Outlook Contacts    Outlook Fax    Outlook General    Outlook Installation    Outlook Interop    Outlook MAC    Outlook Printing    Outlook Program Add-Ins    Outlook Program Forms    Outlook Program VBA    Outlook 3rd Party Utility    Outlook Express    PowerPoint    Project    Project Developer    Project Server    Visio    Visio Developer    Visio General    Word Application Errors    Word Conversions    Word Menus Toolbars    Word Document Management    Word Drawing Graphics    Word International Features    Word mail    Word Mail Merge Fields    Word New Users    Word Numbering    Word OLE Interop    Word Page Layout    Word Printing Fonts    Word Programming    Word Setup Networking    Word Spelling Grammar    Word Tables    Word VBA Add-Ins    Word VBA Beginners    Word VBA Customization    Word VBA    Word VBA User Forms    Works Windows   






  $1000 Contest    [)ia6l0 iii - $228  |  Jonathan VH - $161  |  Huggy Bear - $135  |  F Cali - $95  |  egg egg - $94  |  more Advertise  |  Privacy  |   (c) 2010