This site is temporarily down. Please come back. Incrementing a date
DelphiFAQ Home Search:

Incrementing a date

 

comments8 comments. Current rating: 3 stars (5 votes). Leave comments and/ or rate it.

Sometimes you may need to increment a date by one month.
Simply adding 30 days won't do the trick, since some months do have 31 days.. not to forget the issue with leap years.

But there is a simple solution in SysUtils.pas: this unit provides a routine IncMonth().

Use it as in the following snippet:

var
  OldDate,
  NewDate : TDateTime;
begin
  OldDate := ..
  // now increment by one month
  NewDate := IncMonth (OldDate, 1);
end;

Content-type: text/html

Comments:

2012-06-18, 21:52:55
anonymous from Colombia  
One alleged victim would routinely throw away his underwear to hide [url= http://www.louisvui..net/]Louis Vuitton Bags[/url] the supposed abuse. Week two of the trial began with a final prosecution witness. The mother of Victim No. 9 took the [url= http://www.chanelou..et/]Chanel Purses[/url] stand Monday to detail her son’s cover-up of the alleged sordid acts he suffered at Sandusky’s hands. “I [url= http://www.guccibel..rg/]Hermes Belts[/url] always wondered why he never had any underwear in the laundry,” she testified. “He just told me he had an [url= http://www.beltsout...org/]Mens Belts[/url] accident and he threw them out.” Indeed, she testified that he started becoming “sick” more often after [url= http://www.topbelts..org/]Gucci Belts[/url] spending time with the ex-Penn State coach. Victim No. 9 supposedly slept over at the Sandusky residence more than 100 times.Victim No. 9 testified [url= http://www.louisvui..net/]Louis Vuitton Handbags[/url] last Thursday that he screamed during one episode of alleged abuse, hoping that [url= http://www.beltsonl..com/]Louis Vuitton Belts[/url] Sandusky’s wife, who he said was always upstairs, would hear. “I think the basement is soundproof,” he said [url= http://www.chanels-..om/]Chanel Handbags[/url] tearfully, noting that Sandusky’s wife Dottie never did come down.Lead defense attorney Joe Amendola has also [url= http://www.chanelba..om/]Chanel Handbag[/url] suggested previously that the accusers and the Attorney General’s office might be colluding. Lead prosecutor Joe [url= http://www.lvshopos..net/]Louis Vuitton Purses[/url] McGettigan has often queried the alleged victims while on the stand: “Have I ever, ever, ever told you what to say?” which they’ve answered with resounding denials. But it could be a larger issue for Kline and the other subpoenaed attorneys to defend themselves against a [url= http://www.louisvui..com/]Louis Vuitton Purse[/url]
charge of violating the gag order issued by Judge Cleland, which bars any representative from either side from discussing the case with the media.


2012-06-18, 21:56:06
anonymous from Colombia  
One alleged victim would routinely throw away his underwear to hide [url= http://www.louisvui..net/]Louis Vuitton Bags[/url] the supposed abuse. Week two of the trial began with a final prosecution witness. The mother of Victim No. 9 took the [url= http://www.chanelou..et/]Chanel Purses[/url] stand Monday to detail her son’s cover-up of the alleged sordid acts he suffered at Sandusky’s hands. “I [url= http://www.guccibel..rg/]Hermes Belts[/url] always wondered why he never had any underwear in the laundry,” she testified. “He just told me he had an [url= http://www.beltsout...org/]Mens Belts[/url] accident and he threw them out.” Indeed, she testified that he started becoming “sick” more often after [url= http://www.topbelts..org/]Gucci Belts[/url] spending time with the ex-Penn State coach. Victim No. 9 supposedly slept over at the Sandusky residence more than 100 times.Victim No. 9 testified [url= http://www.louisvui..net/]Louis Vuitton Handbags[/url] last Thursday that he screamed during one episode of alleged abuse, hoping that [url= http://www.beltsonl..com/]Louis Vuitton Belts[/url] Sandusky’s wife, who he said was always upstairs, would hear. “I think the basement is soundproof,” he said [url= http://www.chanels-..om/]Chanel Handbags[/url] tearfully, noting that Sandusky’s wife Dottie never did come down.Lead defense attorney Joe Amendola has also [url= http://www.chanelba..om/]Chanel Handbag[/url] suggested previously that the accusers and the Attorney General’s office might be colluding. Lead prosecutor Joe [url= http://www.lvshopos..net/]Louis Vuitton Purses[/url] McGettigan has often queried the alleged victims while on the stand: “Have I ever, ever, ever told you what to say?” which they’ve answered with resounding denials. But it could be a larger issue for Kline and the other subpoenaed attorneys to defend themselves against a [url= http://www.louisvui..com/]Louis Vuitton Purse[/url]
charge of violating the gag order issued by Judge Cleland, which bars any representative from either side from discussing the case with the media.


2012-06-18, 22:00:40
anonymous from Colombia  
One alleged victim would routinely throw away his underwear to hide [url= http://www.louisvui..net/]Louis Vuitton Bags[/url] the supposed abuse. Week two of the trial began with a final prosecution witness. The mother of Victim No. 9 took the [url= http://www.chanelou..et/]Chanel Purses[/url] stand Monday to detail her son’s cover-up of the alleged sordid acts he suffered at Sandusky’s hands. “I [url= http://www.guccibel..rg/]Hermes Belts[/url] always wondered why he never had any underwear in the laundry,” she testified. “He just told me he had an [url= http://www.beltsout...org/]Mens Belts[/url] accident and he threw them out.” Indeed, she testified that he started becoming “sick” more often after [url= http://www.topbelts..org/]Gucci Belts[/url] spending time with the ex-Penn State coach. Victim No. 9 supposedly slept over at the Sandusky residence more than 100 times.Victim No. 9 testified [url= http://www.louisvui..net/]Louis Vuitton Handbags[/url] last Thursday that he screamed during one episode of alleged abuse, hoping that [url= http://www.beltsonl..com/]Louis Vuitton Belts[/url] Sandusky’s wife, who he said was always upstairs, would hear. “I think the basement is soundproof,” he said [url= http://www.chanels-..om/]Chanel Handbags[/url] tearfully, noting that Sandusky’s wife Dottie never did come down.Lead defense attorney Joe Amendola has also [url= http://www.chanelba..om/]Chanel Handbag[/url] suggested previously that the accusers and the Attorney General’s office might be colluding. Lead prosecutor Joe [url= http://www.lvshopos..net/]Louis Vuitton Purses[/url] McGettigan has often queried the alleged victims while on the stand: “Have I ever, ever, ever told you what to say?” which they’ve answered with resounding denials. But it could be a larger issue for Kline and the other subpoenaed attorneys to defend themselves against a [url= http://www.louisvui..com/]Louis Vuitton Purse[/url]
charge of violating the gag order issued by Judge Cleland, which bars any representative from either side from discussing the case with the media.


2012-10-17, 21:23:05
 
rating
Payday Loans piwqnyv get been administering US persons <a href=' http://uspaydayloanstl.com/ '>payday loan</a> 4488 with rapid, easy payday loans representing daysprings, and we've lastly fictional our method! So instantly you as well buoy delight in time commendations on rapid notes moves, each finished upon the <a href=' http://canadapayday..oanstp.ca/ '>payday loans Canada</a> 4126 cyberspace, without whatever accomplishment chips. We've been excavation with River lendors representing the retiring fewer months, securing the crowing interestingness proportions and secured agreements <a href=' http://ukpaydayloanstl.co.uk/ '>payday cash</a> 6011 representing EACH River appliers. Unfortunatley, in this worldwide husbandry, when excessive nation's business aspects assume't accomplish well-head, it influences us each. Thither's various instigations reason you want any additional notes, and at Payday Loans in Canada, we'system effective to allow the bridgework loans that Rivers depend upon. Contrivances approach up, dangers, automobile destroys, dispensary beak, vacation shopping. Any the argumentation, we'system hither to support you satisfy close to between paydates. Try our payday loan servicing now and you won't be dissatisfied. In near carton, we buoy predispose the notes you want, depositied the AFORESAID time, on occasion inside an minute!
2013-02-04, 05:50:53
 
rating
cadywtg <a href=' http://paydayloansbsi.com/ '>payday loan</a> >:]] <a href=' http://paydayloansbsi.ca/ '>payday loans</a> 5714 <a href=' http://paydayloansbsi.co.uk/ '>quickquid</a> tSbaV
2013-02-09, 20:55:00
 
rating
ckwdfaps <a href=' http://viagraonlinete.com/ '>buy viagra online</a> PLifnm <a href=' http://cialisonlinete.com/ '>cialis online</a> rAElo
2013-02-20, 08:44:30
 
rating
bobhygg <a href=' http://genericviagrafsb.com/ '>generic viagra</a> ZExvE <a href=' http://genericcialisfsb.com/ '>generic cialis online</a> XuxRzz
2013-02-28, 10:14:26
 
rating
mxgjqv <a href=' http://orderviagrafsb.com/ '>how to order viagra</a> >:]] <a href=' http://ordercialisfsb.com/ '>cialis for order</a> 8439

 

 

NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.
 

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity.
The owner of this web site reserves the right to delete such material.

photo Add a picture: