Discussion:
DATEADD or DATEDIFF function
(too old to reply)
John Cosmas
2005-06-15 03:29:14 UTC
Permalink
I need a function that will take today's date and add X days to it. It
should return the new date after the add.
j***@texeme.com
2005-06-15 03:43:06 UTC
Permalink
Post by John Cosmas
I need a function that will take today's date and add X days to it. It
should return the new date after the add.
DateTime.Now.AddDays();

( Doesn't .Net rock ? )
John Cosmas
2005-06-15 04:40:18 UTC
Permalink
I meant to say that I'm programming in VFP 6.0 and not .NET
Post by j***@texeme.com
Post by John Cosmas
I need a function that will take today's date and add X days to it. It
should return the new date after the add.
DateTime.Now.AddDays();
( Doesn't .Net rock ? )
Eric den Doop
2005-06-15 05:47:49 UTC
Permalink
tomorrow = DATE() + 1
yesterday = DATE() - 1
nextmonth = GOMONTH(DATE(), 1)
lastmonth = GOMONTH(DATE(), -1)

( Doesn't VFP rock ? )
--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8
Post by John Cosmas
I meant to say that I'm programming in VFP 6.0 and not .NET
Post by j***@texeme.com
Post by John Cosmas
I need a function that will take today's date and add X days to it. It
should return the new date after the add.
DateTime.Now.AddDays();
( Doesn't .Net rock ? )
b***@yahoo.com
2005-06-19 00:53:47 UTC
Permalink
On Wed, 15 Jun 2005 07:47:49 +0200, "Eric den Doop"
Post by Eric den Doop
tomorrow = DATE() + 1
yesterday = DATE() - 1
nextmonth = GOMONTH(DATE(), 1)
lastmonth = GOMONTH(DATE(), -1)
( Doesn't VFP rock ? )
( Doesn't VFP rock ? ) AMEN TO THAT!
Carsten Bonde
2005-06-15 05:54:39 UTC
Permalink
John,

? Date() + 7 && One week later

--
Cheers
Carsten
_______________________________
Post by John Cosmas
I meant to say that I'm programming in VFP 6.0 and not .NET
Post by j***@texeme.com
Post by John Cosmas
I need a function that will take today's date and add X days to it. It
should return the new date after the add.
DateTime.Now.AddDays();
( Doesn't .Net rock ? )
Olaf Doschke
2005-06-24 07:55:47 UTC
Permalink
Post by j***@texeme.com
DateTime.Now.AddDays();
( Doesn't .Net rock ? )
Yes, it doesn't rock ;-).

At least not in this little aspect, as you can
simply add integers to dates (adding days)
or to datetimes (adding seconds)

wait a minute, wait till
datetime()+60

Bye, Olaf.
Stefan Wuebbe
2005-06-15 05:39:58 UTC
Permalink
I need a function that will take today's date and add X days to it. It should
return the new date after the add.
In VFP you can add the desired number of days as integer to a given date value
dResult = Date() + 5


Please do not crosspost

-Stefan
--
|\_/| ------ ProLib - programmers liberty -----------------
(.. ) Our MVPs and MCPs make the Fox run....
- / See us at www.prolib.de or www.AFPages.de
-----------------------------------------------------------
newboy
2005-08-11 08:09:22 UTC
Permalink
code is under here:

function newdate(adddays as integer)
return date()+adddays
endfuction
Post by John Cosmas
I need a function that will take today's date and add X days to it. It
should return the new date after the add.
Loading...