+ Reply to Thread
Results 1 to 4 of 4

Date conversion & calculation

  1. #1
    Registered User
    Join Date
    05-21-2007
    Posts
    5

    Date conversion & calculation

    Hi!

    I've been following the discussion here for a while, but this is my first post.

    I wonder if someone could advice a simple way to convert the following date format into format which Excel understands:

    Thu May 11 14:57:22 EEST 2006
    Tue May 23 22:05:53 EEST 2006 etc.

    I'd need to convert this into format like dd.mm.yyyy hh:mm:ss. The timezone (EEST) and weekday can be ignored.

    Another questions is then related to calculation of dates. How can I calculate for example how many weeks (or days) is the difference between now and for instance Thu May 11 14:57:22 EEST 2006 (which is first converted to a format which Excel understands as a date)?

    Thanks a lot for your help!

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887
    This should get you the first answer:

    Please Login or Register  to view this content.
    Then, to determine the number of days between two dates, you can use DATEDIF, like so:

    =DATEDIF(<earliest date>,<latest date>,"d")

    where <earliest date> is the earlier of the two dates and <latest date> is the later of the two dates. If A1=May 11, and A2=May 15, you would put:

    =DATEDIF(A1,A2,"d")

    For more on DATEDIF, see http://www.cpearson.com/excel/datedif.htm

    You could even do

    =DATEDIF(A1,Now(),"d")

  3. #3
    Registered User
    Join Date
    05-21-2007
    Posts
    5
    Works like a charm! Thanks a lot for your prompt reply!

  4. #4
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887
    You're welcome, glad I could assist.

+ 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