+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    A1 VIP Member
    Join Date
    Mar 2008
    Location
    Girvan, Ayrshire
    Posts
    1,307
    Thanks
    117
    Thanked 170 Times in 144 Posts

    Default Excel Formula Help please.

    I have downloaded a csv file from Protx, the date is in the format
    29/03/2008 13:18 in column d2


    I need to extract the date, in the dd/mm/yyyy format, and leave the time.
    Into column e2

    I have tried the Left formula
    =LEFT(D2,10)

    But it returns the answer in number format; 39535.5529

    Despite the whole of columns d & e being formated into date, and not general or number, or anything else.

    Please help. If I get this sussed I can upload the CSV file into the accounts rather than type the whole bloomin lot in manually!

    Many thanks
    Sandra

    Despite me checking that the column

  2. #2
    A1 is my Second Home! A1 Regular
    Join Date
    Mar 2008
    Location
    Cambs
    Posts
    410
    Thanks
    64
    Thanked 66 Times in 59 Posts

    Default

    Have you tried doing Text to columns?
    www.float.ltd.uk www.maxxy.co.uk www.creditcontrolmanager.co.uk
    Plastering & Plumbing in Cambridgeshire
    Telemarketing & Credit Management too!

  3. #3
    A1 VIP Member
    Join Date
    Mar 2008
    Location
    Brighton and Hove
    Posts
    469
    Thanks
    38
    Thanked 117 Times in 103 Posts

    Default

    In cell e2, enter =INT(d2)
    Then format the E column to your preferred format as normal.

    Hope this works!
    Last edited by Peter W; 04-04-2008 at 17:52. Reason: Corrected 'D column' to 'E column'

  4. #4
    A1 VIP Member
    Join Date
    Mar 2008
    Posts
    843
    Thanks
    120
    Thanked 472 Times in 274 Posts

    Default

    The problem is the original date is autoconverted into the underlying format

    So you need to convert it back...

    There may be an easier way but this works...

    =DAY(D2)&"/"&MONTH(D2)&"/"&YEAR(D2)

    similar for time

    BTW

    It is far easier and more versatile to do things like this using macro
    Last edited by admagic; 04-04-2008 at 17:43.

  5. #5
    A1 VIP Member
    Join Date
    Mar 2008
    Location
    Girvan, Ayrshire
    Posts
    1,307
    Thanks
    117
    Thanked 170 Times in 144 Posts

    Default

    I've done it! Memory from 10 years ago!!!

    It's because the left function works on text, and the downloaded date column was a date column, so i need to put a ' before the date, then it reads it as text, and then it extracts the first 10 letters only!

    Blimey, can't believe I remembered that (it's must have been the only useful thing that came out of that job!!)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Member Controls

Our Advertisers
Side Column
Text
Text
Text
Text
-->