473,396 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

DATEADD or DATEDIFF function

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.
Jul 21 '05 #1
3 3408
John Cosmas wrote:
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 ? )
Jul 21 '05 #2

"John Cosmas" <jo********@charter.net> schrieb im Newsbeitrag
news:fg***************@fe07.lga...
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
-----------------------------------------------------------

Jul 21 '05 #3
code is under here:

function newdate(adddays as integer)
return date()+adddays
endfuction


"John Cosmas" <jo********@charter.net> дÈëÏûÏ¢ÐÂÎÅ
:fg***************@fe07.lga...
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.

Aug 11 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Brandon | last post by:
Greetings, I am having a problem getting a SQL statement that is functional in Access 2K to work in ASP. My Access SQL statement is this: SELECT DateAdd('s',Ticket_Opened_Date,'Dec 31, 1969...
2
by: Abdul N K | last post by:
I need help in T-SQL. I am using DATEADD function and I want to add 6 months to a date. But it does not return me the rusults, which I want e.g. SELECT DATEADD(m,'20040630') returns 20041230...
4
by: Paolo | last post by:
I am having some problem with a Year Function. I have form on which I have 4 field which indicate dates and an additional form which sums those dates: These are the fields: YEARS...
2
by: PMBragg | last post by:
Thank you in advance. I'm trying to pull all inventory items from December of the previous year back to 4 years for my accountant. I know this can be done, but I'm drawing a blank. I've tried; ...
15
by: PMBragg | last post by:
Thank you in advance. I'm trying to pull all inventory items from December of the previous year back to 4 years for my accountant. I know this can be done, but I'm drawing a blank. I've tried; ...
1
by: PMBragg | last post by:
ORINGINAL Post >Thank you in advance. I'm trying to pull all inventory items from December >of the previous year back to 4 years for my accountant. I know this can be >done, but I'm drawing a...
4
by: ey.markov | last post by:
Greetings, I have an A2K application where for a report the user enters a month-end date, and the system must gather transactions for that month. No problem, I thought, I'll just use the DateAdd...
4
by: Drum2001 | last post by:
I have a report that acts as a time sheet for employees. It lists there "punch-in" and "punch-out and catagorizes them by week, with different totals.. At the end of each week is a total of all...
1
by: sravanbakhsh | last post by:
Hello All, I am trying to compare an expiration date that I store against today's date plus 4 years. If the expiration date is greater (farther out) then today's date + 4 years then I want to...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.