vbscript - Compare DateDiff issue -


i need compare 2 dates find out if computer eol or eol. different kind of text depending on if eol or veol.

current date 29-08-2016 ex. 1 lstrvalue = 31-12-2016 = 4 ex. 2 lstrvalue = 31-07-2016 = -1

select case datediff("m",date,cdate(lstrvalue))     case 1, 2, 3         beol = true     case else         bveryeol = true end select 

the problem in exampel if datediff either 4, 5, 6, ect bveryeol true. not i'm looking for. i'm looking bveryeol true, if datediff negativ

i believe looking this, then:

edit: changed code because previous not valid vbscript

dim strresult : strresult = datediff("m",date,cdate(lstrvalue)) select case strresult     case 1, 2, 3         beol = true     case else         if strresult < 0             bveryeol = true         else             'add logic         end if end select 

Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -