Why are my date results incorrect

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

Guest

When use the SQL editor tool in excel and retieve my data. the correct date
format shows, when I import it into excel the correct format shows, but when
I try to use a formula the date shows up as a number

example date shows as 8/2/2007 but when I try to use the countif I see this
in the formula displays 39296

I am thinking this is why my count if statement is not working
 
If you format the cells from general number to date format the 39296 will be
correct. The count if will work correctly if the condition is a date (ie
7/1/07). The math in excel treats the date like numbers. Excel formats the
numbers to real dates for us humans who can't count the number of days from
Jan 1, 1900.
 
I have formated the cells they are showing up as 8/03/2007 however again when
I try to create a formula I am seeing numbers like this 39296
 
If the results of the formulas are dates, then these cells need to be
formated as dates. If you are using evaluate formula you will see the 39296
becasue the math in excel uses these numbers. Inside VBA you can dimension
variables as dates to make it easier to debug the VBA code.
 

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

Back
Top