K
Kevin Buchan
In VB6, if I had a Date data type with either the date or the time
being something I wanted to keep and I wanted to replace the other
part of the value (like changing the date to 'tomorrow, same time') I
would Format() the Date variable as a string with just the part I
wanted to keep, concatenate that with the new value, then CDate() it
back into a date.
With JScript, I can call setTime() and setDate() to accomplish the
same thing, with much more readable code.
What is the 'right' way to do this with the .Net Framework's
System.DateTime data type?
Thanks.
-Kevin Buchan
(e-mail address removed)
being something I wanted to keep and I wanted to replace the other
part of the value (like changing the date to 'tomorrow, same time') I
would Format() the Date variable as a string with just the part I
wanted to keep, concatenate that with the new value, then CDate() it
back into a date.
With JScript, I can call setTime() and setDate() to accomplish the
same thing, with much more readable code.
What is the 'right' way to do this with the .Net Framework's
System.DateTime data type?
Thanks.
-Kevin Buchan
(e-mail address removed)