+ Reply to Thread
Results 1 to 4 of 4

format now() to date

  1. #1
    Registered User
    Join Date
    03-29-2007
    Location
    Missouri, USA
    Posts
    29

    format now() to date

    when writing vba code, how do i format now() to mm/dd/yyyy so that if i'm searching for a today in a worksheet, it will locate todays date?

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Gregvb,

    You can do it this way...

    Please Login or Register  to view this content.
    Now you can compare Today from a cell with myDate in your code and test if they are equal.

    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    03-29-2007
    Location
    Missouri, USA
    Posts
    29
    that didnt work for me. Perhaps I should be searching for the excel number date (eg 39198) instead. Is there a way to format now() to that?

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Gregvb,

    Post the code you are using to find today and compare it.

    Thanks,
    Leith Ross

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1