DateDiff Function in the Calendar Sample |
Post Reply |
Author | |
jpcoffeyXXX
Groupie Joined: 16 August 2005 Location: United States Status: Offline Points: 31 |
Post Options
Thanks(0)
Posted: 24 May 2009 at 3:45pm |
The use of the DateDiff function in the Calendar Sample application is baffling to me. In the frmEditEvent in the Calendar sample, the following code is listed for the SetStartEnd function,
If AllDay ThenAlso in the UpdateEventFromControls routine this code is listed, If chkAllDayEvent.Value = 1 Then Can someone clarify what this check is for? I don't see why we have to add a day to the EndTime. I don't understand why the DateDiff is being calculated against a value of 0. I can understand that it is a comparison to see if there is a 0 value for EndTime, but why do they add the number 1 to the EndTime if the EndTime is indeed 0? Why wouldn't they add a 1 to the StartTime instead? Thanks for your feedback. Sincerely, John Coffey |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |