Re: Adding dates to get a date

Tech-Archive recommends: Fix windows errors by optimizing your registry



On 12 Aug 2005 07:21:38 -0700, hssmith@xxxxxxxxxxxxx wrote:

>I am trying to add two cells plus 30 and get a date. How would I go
>about doing this? I have tried everything I know.
>
>for example Q7-M7 or Q7-M7+30
>
>Q7 and M7 are both in date format.
>
>I know that I am missing something really simple, but I can't figure
>out what it is.
>
>
>Someone please help - I'm pulling my hair out!!!!
>
>Thanks
>Heather Smith

I'm missing something, or not sure exactly what you want to do.

Excel stores dates as serial numbers with 1=1/1/1900 or 0=1/1/1904 depending on
the system selected.

If Q7 is a date, and M7 is a date, subtracting one from the other will result
in a number equal to the number of days between those two dates. Adding 30 to
that does not give a date; if you format it as a date it will give you a date
value probably back in the 1900's.

e.g.

Q7 := 31 Aug 2005 = 38595
M7 := 31 Jul 2005 = 38564

Q7-M7 = 31 (formatted as a date = 31 Jan 1900)

Q7-M7+30 = 61 (formatted as a date = 1 Mar 1900)

Perhaps if you explain more clearly what it is you are trying to do, and what
your inputs and expected results are, more help will be forthcoming.



--ron
.



Relevant Pages

  • Re: stop script if dates are missing, edit help...
    ... he wanted the ability to enter the start date in 1/1/2005 format and ... right on column J, which is K, if any of those are missing to print out ... msg box and basically stop and say: make sure the dates in the range ... Prev by Date: ...
    (microsoft.public.excel)
  • Re: MYSql, CGI web page search code not working
    ... print MySQLdb.paramstyle returns: format ... But I get this in my Apache error log: ... that I am missing!! ... Prev by Date: ...
    (comp.lang.python)
  • Re: VB.NET Discussion
    ... It's interesting to note that while Format() is clearly a VBA function, Visual Basic isn't mentioned anywhere in at article (unless ... I'm missing the obvious). ... Prev by Date: ...
    (microsoft.public.vb.general.discussion)
  • Re: Question on number formatting
    ... Steve Amphlett wrote: ... >> Can anyone tell me which format I'm looking for, ... I knew there was something I was missing. ... Prev by Date: ...
    (comp.soft-sys.matlab)
  • Re: Please help ntldr is missing
    ... missing or corrupt" as well as "windows\system32\stsem missing". ... computer without the VISTA DVD in and I got the error "NTLDR is missing ... restarted it and pushed a key to boot it from the VISTA DVD. ... a clean format from XP? ...
    (microsoft.public.windows.vista.general)