• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 201
  • Last Modified:

compare dates?

how do i compare dates? i need like
to know where dateofbirth < dateemployed?
since dateofbirth cannot be latter than dateemployed
so it should output an error mesg..how do i do this?
how do i check whether the date_x = date_y?
0
brohans
Asked:
brohans
1 Solution
 
anthonycCommented:
if datediff("d", dateofbirth, dateemployeed) < 0 then
  msgbox "He can't work for us, he is not born yet!!"
end if

0
 
Anita030598Commented:
brohans, if date_x and date_y are both of type Date then you can simply say If date_x = date_y Then
Or use any other comparision operators like <, > etc.,
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now