Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 26
Default Cannot bring out the month & year from a date

Hi

I would like to bring out the month from a given date in the format 'mmm-yy'. The original date is in dd/mm/yyyy format.

But when I am using the Month function with format "mmm-yy", it is giving an erratic result.

Say for example,


A2 B2

15/04/2015 =MONTH(A2) Result = Jan-00


Why is this happening?

regards

San
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,872
Default Cannot bring out the month & year from a date

Hi San,

Am Wed, 29 Apr 2015 02:34:57 -0700 (PDT) schrieb San:

I would like to bring out the month from a given date in the format 'mmm-yy'. The original date is in dd/mm/yyyy format.


Method1:
In B2 write =A2 and format the cell custom with MMM-YY
Method2:
In B2 use =TEXT(A2,"MMM")&"-"&TEXT(A2,"JJ")


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,872
Default Cannot bring out the month & year from a date

Hi again,

Am Wed, 29 Apr 2015 12:35:47 +0200 schrieb Claus Busch:

In B2 use =TEXT(A2,"MMM")&"-"&TEXT(A2,"JJ")


sorry, that is the german format
Try:
=TEXT(A2,"MMM")&"-"&TEXT(A2,"YY")


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 26
Default Cannot bring out the month & year from a date

On Wednesday, April 29, 2015 at 4:11:16 PM UTC+5:30, Claus Busch wrote:
Hi again,

Am Wed, 29 Apr 2015 12:35:47 +0200 schrieb Claus Busch:

In B2 use =TEXT(A2,"MMM")&"-"&TEXT(A2,"JJ")


sorry, that is the german format
Try:
=TEXT(A2,"MMM")&"-"&TEXT(A2,"YY")


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional


Thanks Claus.. That worked

San
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extract Month and year from Cell containing date, month, year & time Montenegro Mick Excel Worksheet Functions 2 May 2nd 12 03:17 AM
Date(Year,Month,Day) not returnign correct date jlclyde Excel Discussion (Misc queries) 8 October 16th 09 02:42 PM
count month when date is in day/month/year format ccKennedy Excel Worksheet Functions 6 April 30th 09 03:32 AM
Tell me which "season" (Month/Day through Month/Day) a date(Month/Day/Year) falls in (any year)??? misscrf Excel Discussion (Misc queries) 1 December 14th 07 03:59 PM
Sort month/date/year data using month and date only SMW820 Excel Discussion (Misc queries) 6 June 22nd 06 05:14 PM


All times are GMT +1. The time now is 03:29 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"