+ Reply to Thread
Results 1 to 11 of 11

Dates value

  1. #1
    Registered User
    Join Date
    08-12-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    98

    Dates value

    Bit puzzled her..

    when I copy an paste (only Value) I don't get the same result for both lines

    28/01/2015 28/01/2015
    2/3/2015 42038

    any ideas why, please?

    Thank you

  2. #2
    Forum Contributor
    Join Date
    01-09-2016
    Location
    Perth Western Australia
    MS-Off Ver
    Office 365
    Posts
    257

    Re: Dates value

    Hi

    You will need to check the format of the cells to "Date"

    Cheers

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Dates value

    42038 is the date serial number for 2/3/2015.

    You just need to format the cell as Date.

    In Excel dates are really just numbers formatted to look like dates. These numbers are commonly referred to as the date serial number. The date serial number is the count of days starting from a base date. In Windows Excel the default base date is January 1, 1900. So, January 1, 1900 is date serial number 1.

    Jan 1 1900 = date serial number 1
    Jan 2 1900 = date serial number 2
    Jan 3 1900 = date serial number 3
    Jan 4 1900 = date serial number 4
    Jan 5 1900 = date serial number 5
    etc
    etc
    Jan 1 1975 = date serial number 27395
    Jan 1 2000 = date serial number 36526
    Jan 1 2016 = date serial number 42370

    You can see the date serial number by entering some date in a cell and then changing that cells format to General or Number.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    08-12-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    98

    Re: Dates value

    Quote Originally Posted by Tony Valko View Post
    42038 is the date serial number for 2/3/2015.

    You just need to format the cell as Date.

    In Excel dates are really just numbers formatted to look like dates. These numbers are commonly referred to as the date serial number. The date serial number is the count of days starting from a base date. In Windows Excel the default base date is January 1, 1900. So, January 1, 1900 is date serial number 1.

    Jan 1 1900 = date serial number 1
    Jan 2 1900 = date serial number 2
    Jan 3 1900 = date serial number 3
    Jan 4 1900 = date serial number 4
    Jan 5 1900 = date serial number 5
    etc
    etc
    Jan 1 1975 = date serial number 27395
    Jan 1 2000 = date serial number 36526
    Jan 1 2016 = date serial number 42370

    You can see the date serial number by entering some date in a cell and then changing that cells format to General or Number.


    Thanks for the extensive answer, unfortunately I still have issue unresolved even when I change the formatting.

    Please see the attachment

    Thanks
    Attached Files Attached Files

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Dates value

    I downloaded your file.

    Cell B6 contained the number value 42038 and the cell was formatted as General.

    I changed the cell format to Date and the cell displayed the date 2/3/2015 (m/d/yyyy).

  6. #6
    Registered User
    Join Date
    08-12-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    98

    Re: Dates value

    Quote Originally Posted by Tony Valko View Post
    I downloaded your file.

    Cell B6 contained the number value 42038 and the cell was formatted as General.

    I changed the cell format to Date and the cell displayed the date 2/3/2015 (m/d/yyyy).
    the issue is with A5 when I change it to number Value it stays the same ..?! result in B5

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Dates value

    When I open the file cell A5 contains the TEXT string 28/01/2015 and the cell is formatted as General.

    My regional date format is m/d/yyyy. Usually, the dates should convert to the settings of the recipient of the file but it did not happen this time for whatever reason.

    If I manually re-enter the date as 1/28/2015 then it converts to the date value of 1/28/2015.

    If you have a lot of these you can convert them to true numeric dates by...

    Select the cells in question
    Goto the Data tab>Text to Columns
    Click Next twice
    In Step 3 of the userform under Column data format select Date and in the drop down select DMY
    Click Finish

    Sometimes this will convert TEXT dates into numeric dates.

  8. #8
    Registered User
    Join Date
    08-12-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    98

    Re: Dates value

    Quote Originally Posted by Tony Valko View Post
    When I open the file cell A5 contains the TEXT string 28/01/2015 and the cell is formatted as General.

    My regional date format is m/d/yyyy. Usually, the dates should convert to the settings of the recipient of the file but it did not happen this time for whatever reason.

    If I manually re-enter the date as 1/28/2015 then it converts to the date value of 1/28/2015.

    If you have a lot of these you can convert them to true numeric dates by...

    Select the cells in question
    Goto the Data tab>Text to Columns
    Click Next twice
    In Step 3 of the userform under Column data format select Date and in the drop down select DMY
    Click Finish

    Sometimes this will convert TEXT dates into numeric dates.
    yes I have many of them on a column, the issue is they are mixed formats as well as having the text formats, . see attached,

    my aim is to have all of them in one Date Format

    Thanks

  9. #9
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Dates value

    You could use a formula to convert all to dates.

    Entered in B2:

    =IF(N(A2),A2,DATE(RIGHT(A2,4),SUBSTITUTE(MID(A2,FIND("/",A2),3),"/",""),LEFT(A2,FIND("/",A2)-1)))

    Format as Date

    Copy down as needed.

  10. #10
    Registered User
    Join Date
    08-12-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    98

    Re: Dates value

    Quote Originally Posted by Tony Valko View Post
    You could use a formula to convert all to dates.

    Entered in B2:

    =IF(N(A2),A2,DATE(RIGHT(A2,4),SUBSTITUTE(MID(A2,FIND("/",A2),3),"/",""),LEFT(A2,FIND("/",A2)-1)))

    Format as Date

    Copy down as needed.
    Excellent one !! Thank you!

  11. #11
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Dates value

    You're welcome. Thanks for the feedback!

+ 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. Populating list of dates from another sheet with Start Dates and End Dates
    By Jesshloly in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-05-2015, 04:07 AM
  2. Check dates in range either same dates or different dates by formula
    By breadwinner in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-12-2013, 07:42 AM
  3. Replies: 7
    Last Post: 05-02-2013, 09:50 PM
  4. Replies: 6
    Last Post: 03-11-2013, 06:11 PM
  5. [SOLVED] Array of dates when tested shows no dates ......but there are dates
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-29-2012, 12:45 PM
  6. [SOLVED] Highlight Group of Dates if Dates Match List of other Dates
    By martinpgibson in forum Excel General
    Replies: 5
    Last Post: 10-24-2012, 08:14 PM
  7. [SOLVED] Auto filling dates based on previously entered dates and averaging numbers if dates equal
    By grambograham in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-11-2012, 03:21 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