+ Reply to Thread
Results 1 to 9 of 9

Date to date formula

  1. #1
    Registered User
    Join Date
    10-08-2015
    Location
    Gothenburg
    MS-Off Ver
    2016
    Posts
    78

    Date to date formula

    Hey guys.

    is it possible to write a formula like the topic says?

    Something like this

    Please Login or Register  to view this content.
    To make it look like this "2017-06-07 - 2017-07-07"

    I don't have any data in reference cell so far, but if it's neccessary I can put it in somewhere.

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Date to date formula

    Close, but you have to apply the TEXT function to the dates.

    =TEXT(TODAY(),"yyyy-mm-dd")&" - "&TEXT(TODAY()+30,"yyyy-mm-dd")

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Date to date formula

    Or
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  4. #4
    Registered User
    Join Date
    10-08-2015
    Location
    Gothenburg
    MS-Off Ver
    2016
    Posts
    78

    Re: Date to date formula

    Thanks guys. Both solutions worked just fine! Just one small that is annoying. When I do the formula, the month part is "00" for some reason. Any idea what it could be?

    Like this 2017-00-07

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Date to date formula

    You're welcome.

    change mm to just m (same for the day part, dd=07,d=7)

  6. #6
    Registered User
    Join Date
    10-08-2015
    Location
    Gothenburg
    MS-Off Ver
    2016
    Posts
    78

    Re: Date to date formula

    Quote Originally Posted by Jonmo1 View Post
    You're welcome.

    change mm to just m (same for the day part, dd=07,d=7)
    Tried to do so, it still shows the month part with just a zero "2017-0-7" or "2017-0-07"

  7. #7
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Date to date formula

    Really? You must have some different regional settings that use different date formats.

    See if you can look through your actual cell format settings for the date formats.

  8. #8
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Date to date formula

    Try to switch yyyy-mm-dd to yyyy-dd-mm and see if it works

  9. #9
    Registered User
    Join Date
    10-08-2015
    Location
    Gothenburg
    MS-Off Ver
    2016
    Posts
    78

    Re: Date to date formula

    Quote Originally Posted by Jonmo1 View Post
    Really? You must have some different regional settings that use different date formats.

    See if you can look through your actual cell format settings for the date formats.
    Solved it by changing it to capital letters, wierd but it worked! xD ex. YYYY-MM-DD.

+ 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. Replies: 7
    Last Post: 02-02-2017, 02:41 PM
  2. Replies: 5
    Last Post: 12-01-2015, 02:36 PM
  3. [SOLVED] Formula to compare date (including month and year) from a listed date to today's date
    By mhewitson15 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-11-2014, 05:31 PM
  4. Replies: 2
    Last Post: 11-03-2014, 10:29 AM
  5. Counting if data falls on date between Start Date, End Date or Possible End Date
    By JessHasQuestions in forum Hello..Introduce yourself
    Replies: 2
    Last Post: 07-26-2014, 08:01 AM
  6. Date/Due Date/Completed Date Formula
    By synergeticink in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-10-2013, 02:55 PM
  7. Replies: 1
    Last Post: 10-02-2012, 02:42 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