|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
change datequick question here.
I have a date variable that I would like to change. I need to add 364 days to it, i.e. I need year+1, day-1. any help is appreciated! Thanks Dim todaysdate As Date = Date.Now
MsgBox(todaysdate.AddDays(364)) <andrew***@gmail.com> wrote in message Show quoteHide quote news:1166795871.831525.49430@42g2000cwt.googlegroups.com... > quick question here. > > I have a date variable that I would like to change. I need to add 364 > days to it, i.e. I need year+1, day-1. > > any help is appreciated! > > Thanks > How about
Dim MyDate As Date = Date.Today MyDate = MyDate.AddDays(364) HTH Martin <andrew***@gmail.com> wrote in message Show quoteHide quote news:1166795871.831525.49430@42g2000cwt.googlegroups.com... > quick question here. > > I have a date variable that I would like to change. I need to add 364 > days to it, i.e. I need year+1, day-1. > > any help is appreciated! > > Thanks > Dim dt As Date = Date.Today.AddDays(364)
Show quoteHide quote "Martin" <mar***@martin.com> wrote in message news:hVRih.22088$z01.10453@newsfe3-gui.ntli.net... > How about > > Dim MyDate As Date = Date.Today > MyDate = MyDate.AddDays(364) > > HTH > > Martin > > <andrew***@gmail.com> wrote in message > news:1166795871.831525.49430@42g2000cwt.googlegroups.com... >> quick question here. >> >> I have a date variable that I would like to change. I need to add 364 >> days to it, i.e. I need year+1, day-1. >> >> any help is appreciated! >> >> Thanks >> > > It would be nice and easy to use DateTime.Now.AddDays(364) but this would
give a result that is a day short where a leap year is involved. To be leap year safe, you need to use: DateTime.Now.AddYears(1).AddDays(-1) <andrew***@gmail.com> wrote in message Show quoteHide quote news:1166795871.831525.49430@42g2000cwt.googlegroups.com... > quick question here. > > I have a date variable that I would like to change. I need to add 364 > days to it, i.e. I need year+1, day-1. > > any help is appreciated! > > Thanks > Your right. I am wrong. Listen to this.
Sorry about that. Show quoteHide quote "Stephany Young" <noone@localhost> wrote in message news:eun6oReJHHA.4112@TK2MSFTNGP04.phx.gbl... > It would be nice and easy to use DateTime.Now.AddDays(364) but this would > give a result that is a day short where a leap year is involved. > > To be leap year safe, you need to use: > > DateTime.Now.AddYears(1).AddDays(-1) > > > <andrew***@gmail.com> wrote in message > news:1166795871.831525.49430@42g2000cwt.googlegroups.com... >> quick question here. >> >> I have a date variable that I would like to change. I need to add 364 >> days to it, i.e. I need year+1, day-1. >> >> any help is appreciated! >> >> Thanks >> > >
How I can find out on which platform I am running (32/64 bits)?
Why not use DAO? Binary Read Method? Make inherited property invisible mouse right click your favorite VB 2005 book? Windows Service to copy files to a Mapped Drive Form Focus schema.ini Pipe Delimited to Access Database can send data to sql 2005, can not read data from sql 2005 with vb |
|||||||||||||||||||||||