|
-
Dec 3rd, 2015, 01:35 PM
#1
Thread Starter
PowerPoster
[RESOLVED] Check if DTPicker1 time value is incresed by 5 minutes from the current time
I have a time picker that sets reminders it opens to the current time. I want to make sure the time is increased by 5 minutes when the OK button is clicked
if DTPicker1.value < 5 minutes from now
msgbox "you must increase the time by at least 5 minutes"
Exit Sub
end if
it opens like this:
DTPicker1.CustomFormat = "hh:mm tt"
DTPicker1.Format = dtpCustom
DTPicker1.Value = Now
DTPicker1.Format = 2
it shows the time as AM/PM
have tried this
If DateDiff("n", Time, DTPicker1.Value) < 5 Then
MsgBox "You must increase the time by at least 5 minutes."
End If
and this:
Dim date1 As Date
date1 = CDate(DTPicker1.Value)
If DateDiff("n", date1, Now) < 5 Then
MsgBox ("You must increase the time by at least 5 minutes.")
End If
they do not work
how can this be written ?
Waiting for a full featured smart phone with out marrying a provider
Go Android
Go raiders 
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
|