I am attempting to use the datetime object to determine how many days until Christmas day. I have to use the Now method. Any suggestions?
datetime object
Collapse
X
-
DateTime.Now will give the current system date timeOriginally posted by ElendaI am attempting to use the datetime object to determine how many days until Christmas day. I have to use the Now method. Any suggestions?
create a new datetime with the values of the date of christmas
and subtract datetime.now from the christmas object to get a timespan
and timespan.days will gve you the number of days
cheers
Comment