+ Reply to Thread
Results 1 to 6 of 6

Convert Timestamp vaule to date

  1. #1
    Registered User
    Join Date
    07-01-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    50

    Convert Timestamp vaule to date

    Hi,

    I have got a series of values like 21 Jul 2010 07:12PM which i would like to convert into date formate in Excel.
    Exmaple:
    21 Jul 2010 07:12PM
    to
    dd/mm/yyyy (21/07/2010)

    Any help would be appriciate.

    Thanks
    Last edited by dpatel; 07-23-2010 at 06:47 AM.

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Convert Timestamp vaule to date

    Assuming those are text strings:

    =INT(SUBSTITUTE(SUBSTITUTE(A1,"PM"," PM"),"AM"," AM")*1)

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Registered User
    Join Date
    07-01-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: Convert Timestamp vaule to date

    Thanks Dom, this will work for me but how can we convert to read as a "Date format (dd/mm/yyyy)" using same formula rather than changing a format cell to date?

    Dipesh

  4. #4
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097

    Re: Convert Timestamp vaule to date

    Hi,

    How about

    =TEXT(INT(SUBSTITUTE(SUBSTITUTE(A1,"PM"," PM"),"AM"," AM")*1),"dd/mm/yyyy")
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Convert Timestamp vaule to date

    In terms of the formula you could I think (based on your sample) you could also use:

    =0+LEFT(A1,LEN(A1)-7)

    Format cell as dd/mm/yyyy or if you want the above as literal string rather than a date

    =TEXT(LEFT(A1,LEN(A1)-7),"dd/mm/yyyy")

  6. #6
    Registered User
    Join Date
    07-01-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: Convert Timestamp vaule to date

    Thanks guys, All soluations worked with Charm!!!

+ 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