[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: ayuda
From: |
Martin Helm |
Subject: |
RE: ayuda |
Date: |
Sun, 16 Oct 2011 03:33:26 +0200 |
Am Samstag, den 15.10.2011, 20:18 -0500 schrieb rolando rios cruz:
>
>
> > Subject: Re: ayuda
> > From: address@hidden
> > To: address@hidden
> > CC: address@hidden
> > Date: Sun, 16 Oct 2011 02:47:51 +0200
> >
> > Am Samstag, den 15.10.2011, 19:36 -0500 schrieb rolando rios cruz:
> > > Hello I would like to calculate the number of days to a date to
> > > another, I tried to use functions like "date". I hope answer
> thanks
> > > _
> > Something like that?
> >
> > datenum(2011, 11, 2) - datenum(2010, 12, 31)
> > ans = 306
> >
> > datenum(2011, 11, 2) - datenum(2011, 11, 1)
> > ans = 1
> >
> >
>
>
>
>
>
> Thank,
> but if I want to enter the date using the "input" function to add a
> date which would be the syntax?
Please keep the list on cc.
I guess you want something like this (just an example, you can use other
formats or calculate the difference to floor(now) which is just today)
dts = input ("Enter date as yyyy-mm-dd: ", "s");
dt1 = datevec(dts, "yyyy-mm-dd");
dts = input ("Enter a second date as yyyy-mm-dd: ", "s");
dt2 = datevec(dts, "yyyy-mm-dd");
difference = datenum(dt2) - datenum(dt1)
- ayuda, rolando rios cruz, 2011/10/15
- Re: ayuda, Ben Abbott, 2011/10/15
- Re: ayuda, Martin Helm, 2011/10/15
- Message not available
- RE: ayuda,
Martin Helm <=
- FW: ayuda, rolando rios cruz, 2011/10/17
- ayuda, rolando rios cruz, 2011/10/17