Solved

compare dates?

Posted on 1998-07-29
2
189 Views
Last Modified: 2010-05-03
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
Comment
Question by:brohans
2 Comments
 
LVL 6

Accepted Solution

by:
anthonyc earned 50 total points
ID: 1467101
if datediff("d", dateofbirth, dateemployeed) < 0 then
  msgbox "He can't work for us, he is not born yet!!"
end if

0
 
LVL 1

Expert Comment

by:Anita030598
ID: 1467102
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

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Put text in a picture ASP.NET C# 2 58
Sending a email via excel using vba 6 85
SQL VB connection works in one PC and doesn't in another 15 64
Problem to With line 4 57
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question