vbscript date

Posted on 2006-06-06
Last Modified: 2010-04-30
I can't seem to work this out using vbscript,
I am trying to enumerate a text file that is formatted like this

I am using the split function and I want to do something like this:
If Myarr(2) or Myarr(3) = today then do something

right now I have something like this:
t = Date
If Myarr(2) = t then
 msgbox "today"
end if

I can make the 2 date entries any format that makes it easier for you;

if I use VB6 it works but I would like to keep it in vbscript

Thanks for any help you can give me
Question by:mdiglio
    LVL 92

    Accepted Solution

    Hi mdiglio,


    t = Date
    If DateValue(Myarr(2)) = t then
     msgbox "today"
    end if


    LVL 16

    Author Comment

    Thank You
    Works great!
    LVL 92

    Expert Comment

    by:Patrick Matthews

    You're most welcome :)



    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
    Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
    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…

    728 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

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now