Drinkwater
Drinkwater

Reputation: 23

what is the format of the value of date picker?

In access, I use date picker to select a date, so what is the format of this date? is it a string or is it a date? If I want to compare this value with other date, what format I should use?

Upvotes: 0

Views: 48

Answers (1)

Gustav
Gustav

Reputation: 55831

It's a date value.

To compare dates, use DateDiff:

If DateDiff("d", Date, YourPickedDateValue) > 0 Then
    MsgBox "A future date cannot be used."
Else
    ' Do stuff.
End If

Upvotes: 1

Related Questions