LOGIC CONDITION

User avatar
sal21
PlatinumLounger
Posts: 4346
Joined: 26 Apr 2010, 17:36

LOGIC CONDITION

Post by sal21 »

I have 2 combo.
combo1=01/01/2014
combo2=26/01/2014

I need to check if date in combo2 >= to the and of date based the month in combo1 and assign boolean to a variable.

Example:

01/01/2014 31/01/2014 true
04/01/2014 26/01/2014 false
03/03/2014 31/03/2014 true

User avatar
HansV
Administrator
Posts: 78402
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: LOGIC CONDITION

Post by HansV »

Do you mean "the end of the month" instead of "to the and of date based the month"?
Best wishes,
Hans

User avatar
sal21
PlatinumLounger
Posts: 4346
Joined: 26 Apr 2010, 17:36

Re: LOGIC CONDITION

Post by sal21 »

HansV wrote:Do you mean "the end of the month" instead of "to the and of date based the month"?
sorry, "the end of the month"

User avatar
HansV
Administrator
Posts: 78402
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: LOGIC CONDITION

Post by HansV »

Try

MyVar = (combo2 >= DateSerial(Year(combo1), Month(combo1) + 1, 0))
Best wishes,
Hans