May 5th, 2012, 12:18 AM
#16
Re: Date Comparison
Private Sub cmdCalculate_Click()
lblYears.Caption = ""
lblMonths.Caption = ""
lblDays.Caption = ""
lblQuarter.Caption = ""
lblCalenderWeeks.Caption = ""
lblWeeks.Caption = ""
lblHours.Caption = ""
lblMinutes.Caption = ""
lblSeconds.Caption = ""
lblYears.Caption = DateDiff("YYYY", dtpStartDate.Value, dtpEndDate.Value)
lblMonths.Caption = DateDiff("M", dtpStartDate.Value, dtpEndDate.Value)
lblDays.Caption = DateDiff("D", dtpStartDate.Value, dtpEndDate.Value)
lblQuarter.Caption = DateDiff("Q", dtpStartDate.Value, dtpEndDate.Value)
lblCalenderWeeks.Caption = DateDiff("WW", dtpStartDate.Value, dtpEndDate.Value)
lblWeeks.Caption = DateDiff("W", dtpStartDate.Value, dtpEndDate.Value)
lblHours.Caption = DateDiff("H", dtpStartDate.Value, dtpEndDate.Value)
lblMinutes.Caption = DateDiff("N", dtpStartDate.Value, dtpEndDate.Value)
lblSeconds.Caption = DateDiff("S", dtpStartDate.Value, dtpEndDate.Value)
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 27 Then
End
End If
End Sub
Private Sub Form_Load()
dtpStartDate.Value = Date
dtpEndDate.Value = Date
End Sub
Attached Files
Tags for this Thread
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width