+ Reply to Thread
Results 1 to 3 of 3

date issue mm/dd/yyyy and dd/mm/yyyyy

  1. #1
    Registered User
    Join Date
    04-28-2011
    Location
    Auckland
    MS-Off Ver
    Excel 2003
    Posts
    24

    Question date issue mm/dd/yyyy and dd/mm/yyyyy

    I have the below code that goes through pivot tables/charts and makes certain dates invisible:

    Please Login or Register  to view this content.
    But this line of code shows me that the date is in the format mm/dd/yyyy. How do I rectify this?

    Please Login or Register  to view this content.

    As this messes up my if statement


    Please Login or Register  to view this content.

    It is stored in the format dd/mm/yyyyy, but not sure how to correct the conversion??

    Any ideas?

    Thanks

  2. #2
    Forum Contributor wamp's Avatar
    Join Date
    11-10-2008
    Location
    Norway
    MS-Off Ver
    97, 2000 & 2003 (diff. workstations)
    Posts
    184

    Re: date issue mm/dd/yyyy and dd/mm/yyyyy

    I suggest you read this:
    http://www.techonthenet.com/excel/fo...ormat_date.php

    for explanation on Date-formatting in VBA
    _______________________________________________
    Remember:

    Read the rules!

    Use code tags! Place [CODE] before the first line of code and [/CODE] after the last line of code.

    Mark your post [SOLVED] if it has been answered satisfactorily.
    To do this, click EDIT in your original post, click GO ADVANCED and set the PREFIX. It helps everybody!

    If you are approve (or disapprove) of any members response to your problem, please click the star icon underneath their post and comment. It matters.

  3. #3
    Registered User
    Join Date
    04-28-2011
    Location
    Auckland
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: date issue mm/dd/yyyy and dd/mm/yyyyy

    thanks wamp, but I found a better way using existing varialbls. I use FirstDate to control my if loop.

    Had a go at the fromat thing but it looked a bitmore difficult, cheers though. I,m sure I will revisit that

    Please Login or Register  to view this content.

+ 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