+ Reply to Thread
Results 1 to 5 of 5

can I Split a date field and format in one statment?

  1. #1
    Registered User
    Join Date
    06-22-2011
    Location
    Kansas City, MO
    MS-Off Ver
    Excel 2007
    Posts
    18

    can I Split a date field and format in one statment?

    I have a field that contains a time period. ie: 01/01/2017-01/07/2017 I only need the first date

    I'm using =left(xx,find("-",xx)-1) which works fine. I get 01/01/2017

    I need that ending value to be formatted like Jan 2017. I created a NEW column for month/year. =text(xx,"mmm yyy")

    is there anyway to do this all in one step?

    thank you
    Steve B

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: can I Split a date field and format in one statment?

    Yes. Like this:

    =TEXT(left(xx,find("-",xx)-1),"mmm yyy")

    But you only really need this:

    =TEXT(LEFT(xx,10),"mmm yyy")
    Last edited by AliGW; 07-27-2017 at 11:30 AM. Reason: Misread requirements - changed formulae.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

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

    Re: can I Split a date field and format in one statment?

    Try

    =TEXT(LEFT(A1,FIND("-",A1)-1),"mmm yyyy")

  4. #4
    Registered User
    Join Date
    06-22-2011
    Location
    Kansas City, MO
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: can I Split a date field and format in one statment?

    THANK YOU THANK YOU THANK YOU..

    one less column to deal with....

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: can I Split a date field and format in one statment?

    You're welcome!

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. conditional format if date in field is within the next 6 months
    By Jason_C in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-28-2017, 02:17 AM
  2. [SOLVED] Concatenate a date field keeping the date format
    By rrcrossman in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-13-2016, 04:28 PM
  3. [SOLVED] Chaneg value to Date format within same field A1
    By nironto in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-17-2013, 02:25 AM
  4. Replies: 1
    Last Post: 04-11-2013, 12:22 AM
  5. Change the date field in ListBox in (mm-dd-yy) for another format (dd-mm-yyy)
    By Francisco Sousa in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-19-2013, 10:58 AM
  6. Replies: 4
    Last Post: 08-09-2012, 04:55 AM
  7. How do I format date field in footer?
    By Terry Sharman in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 04-12-2006, 03:15 PM

Tags for this Thread

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