datetime data type cannot be changed

  • Thread starter Thread starter Ian Ornstein
  • Start date Start date
I

Ian Ornstein

In other software, I could increment (or decrement) a datetime data
item by minute, hour, day, month or year. This is helpful when
tranversing special characters such as manufacturing calendars.

But in the .Net Framwork, this is not available (I sure would like to
know the reasoning behind this decision). For the moment, I would
appreciate suggestions for work arounds.

Thanks,

- IanO -
 
Ian Ornstein said:
In other software, I could increment (or decrement) a datetime data
item by minute, hour, day, month or year. This is helpful when
tranversing special characters such as manufacturing calendars.

But in the .Net Framwork, this is not available (I sure would like to
know the reasoning behind this decision). For the moment, I would
appreciate suggestions for work arounds.

Have a look at DateTime.AddDays etc.
 
Ian said:
But in the .Net Framwork, this is not available (I sure would like to
know the reasoning behind this decision). For the moment, I would
appreciate suggestions for work arounds.

In addition to Jon's suggestion, the DateTime struct has overloaded the
+ and - operators so you can perform math with TimeSpan and DateTime
objects.

You might want to consult the help file for more details.

--
There are 10 kinds of people. Those who understand binary and those who
don't.

http://code.acadx.com
(Pull the pin to reply)
 
Back
Top