+ Reply to Thread
Results 1 to 3 of 3

Thread: extract character from date format & no of days between date

  1. #1
    Valued Forum Contributor
    Join Date
    07-24-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2003 (office) 2007 (home)
    Posts
    235

    extract character from date format & no of days between date

    Hi,

    I have two questions regarding date format and hope you can provide input.

    1) say 01/01/2010 displays as Jan-10 and i need a new column to state it as JAN. What function should i use to achieve it?

    2) i need to state the difference between first day and last day of the month. What function should i use to achieve it?

    Thanks in advance for you guys help.
    Last edited by mingali; 01-17-2010 at 10:18 AM.

  2. #2
    Forum Moderator DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Suffolk, UK
    MS-Off Ver
    2002, 2007 & 2010
    Posts
    21,423

    Re: extract character from date format & no of days between date

    Re question 1 - either:

    a) =A1 format as MMM

    b) =TEXT(A1,"MMM")

    Re: question 2 - either:

    a) =DAY(EOMONTH(A1,0))

    b) =DAY(DATE(YEAR(A1),MONTH(A1)+1,0))

    use of EOMONTH requires activation of Analysis ToolPak pre XL2007

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    6,202

    Re: extract character from date format & no of days between date

    1) right click on the cell -> Format cells -> custom -> (write in) mmmm (for January) or mmm (for Jan)

    2) try this formula =DATE(;MONTH(L28)+1; )-DATE(;MONTH(L28); )

    Replace ; with , if needed
    "Relax. What is mind? No matter. What is matter? Never mind!"

+ 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.2.0