+ Reply to Thread
Results 1 to 3 of 3

Date not formatted correctly

  1. #1
    Registered User
    Join Date
    01-23-2022
    Location
    uk
    MS-Off Ver
    MS Office 365
    Posts
    27

    Date not formatted correctly

    Hi,

    I have a load of dates that copy from another sheet, which has been working fine, i now have some dates that left aligned as not a true date,

    Columns are E and F for dates, ive tried cdate, datevalue, but cannot seem to get them correct. closest i have managed to get work is

    Please Login or Register  to view this content.
    but when i try to filter the dates are showing incorrect i.e months instead of days etc. looks like the true dates are correct but the others are not.

    Just add pressing f2 and enter fixes the dates.

    any ideas on how to resolve this ?
    Last edited by jynxy; 10-04-2023 at 02:44 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,888

    Re: Date not formatted correctly

    VBA only recognises the m/d/yyyy (US-style) date format. This causes similar issues all the time. You'd do well to attach a sampe workbook (desensitised).
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    01-23-2022
    Location
    uk
    MS-Off Ver
    MS Office 365
    Posts
    27

    Re: Date not formatted correctly

    it appears the csv file i was importing from was mixing dates a simple , Local:=True at the end of the workbook.open sorted this

+ 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. Convert date using number that is not formatted Correctly
    By brandonmcg in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-07-2022, 02:17 PM
  2. [SOLVED] Code to check if a string is formatted correctly as a part number
    By Arnold Layne in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-20-2021, 01:03 PM
  3. [SOLVED] Dates seem formatted correctly, but will not sort newest to oldest.
    By MelindaCapri in forum Excel General
    Replies: 6
    Last Post: 02-11-2015, 02:34 PM
  4. [SOLVED] Numbers Not Formatted Correctly
    By aferoz in forum Excel General
    Replies: 3
    Last Post: 06-25-2012, 11:28 AM
  5. [SOLVED] Last two rows not formatted, but are copied over correctly, with no reason why
    By Cyberpawz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-18-2012, 07:26 AM
  6. Rightclick macro if cell contents formatted correctly
    By ahartman in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-20-2009, 12:00 PM
  7. Replies: 3
    Last Post: 03-25-2006, 12:25 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