|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
calculate date in the futureDoes anyone know if there is easy way to calculate a certain day in the future ? For example: I would like to calculate when the date is 15 days from today .... I've tried something stuppid like ... mydate.addDays(15) .... but that would be to easy .. Any suggestions Thanx John John,
That should work. Keep in mind that AddDays returns a new datetime, it does not add the days to the current datetime value. You should be able to do this: myDate = myDate.AddDays(15) Or you could assign the new datetime value into to another variable: myNewDate = myDate.AddDays(15) Of course, you could also use the classic VB function DateAdd. Kerry Moorman Show quoteHide quote "John Devlon" wrote: > Hello everyone... > > Does anyone know if there is easy way to calculate a certain day in the > future ? > > For example: I would like to calculate when the date is 15 days from today > .... > > I've tried something stuppid like ... > > mydate.addDays(15) > > .... but that would be to easy .. > > Any suggestions > > Thanx > > John > > > > Kerry,
In my idea is your answer wrong while you describe it well.. >> mydate.addDays(15) That won't work, it has to be> That should work...................................................... > myDate = myDate.AddDays(15) Just for those reading your message.:-) CorThank you ...
John Show quoteHide quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> schreef in bericht news:uIgVxiMzGHA.4580@TK2MSFTNGP05.phx.gbl... > Kerry, > > In my idea is your answer wrong while you describe it well.. > >>> mydate.addDays(15) > >> That should work...................................................... > That won't work, it has to be > >> myDate = myDate.AddDays(15) > > Just for those reading your message. > > :-) > > Cor > > > > "John Devlon" <johndev***@hotmail.com> wrote in message Eg. For date 15 days from now....news:AmqJg.50418$jR1.755814@phobos.telenet-ops.be... > Hello everyone... > > Does anyone know if there is easy way to calculate a certain day in the > future ? Dim dFutureDate As Date dFutureDate = DateAdd(DateInterval.Day,15,Now) Cheers.
DataGridView and ComboBox
FOR ALL - Best Practices for navigating within code? -plus - Add-In's that help? Data Wizard Report is mostly hidden in the report viewer Multiple icons into 1 exe or dll fill combobox1... combobox with data binding how to get parent control of the context menu stip Sending email from Windows application Not working. Progress bar to run with the datachecking |
|||||||||||||||||||||||