+ Reply to Thread
Results 1 to 3 of 3

Day and Month of the date switched!

  1. #1
    Registered User
    Join Date
    10-25-2014
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    4

    Day and Month of the date switched!

    Hello everybody!

    I have an array (array_Week) that contains multiple dates inside. When I look at the codes in debug mode, I notice that the date is in correct format (d/m/yyyy), yet when i output on to a range, the day and month switched.

    I tried NumberFormat and NumberFormatLocal the range but it still comes out wrong.
    I also tried formatting every single date inside the array, but it still comes out wrong.
    I can't convert it to double because i have to use the date and compare it with the dates in my data excel files.

    Please help me.

    Edited:

    Hello! Just in case other people or future me would need a solution to this problem, I decided to write down the solution I found.

    I managed to solved it by making another array to contain the date in number format, then i output that array on the range and NumberFormatLocal the range! ^^
    Last edited by kisa159; 11-13-2014 at 10:43 AM. Reason: Managed to solved!

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,620

    Re: Day and Month of the date switched!

    How are you outputting it to the range?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    10-25-2014
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    4

    Re: Day and Month of the date switched!

    This is the code for output

    Range("i_selectionlist1") = WorksheetFunction.Transpose(arrayWeek)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Sort month/date/year data using month and date only
    By SMW820 in forum Excel General
    Replies: 8
    Last Post: 11-18-2014, 08:39 AM
  2. How can i show date in this form (month,last date of that month, Year)?
    By vjharry in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-24-2014, 04:39 AM
  3. [SOLVED] Date function- 1st day of month for 2nd full month from start date
    By vidiotdave in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-25-2014, 05:33 AM
  4. Fields switched to date format
    By John Hobbs in forum Excel General
    Replies: 0
    Last Post: 02-22-2008, 07:51 AM
  5. [SOLVED] Date arithmetic: adding 1 month to prior end of month date
    By manxman in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-14-2006, 04:35 PM

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