ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Date format (https://www.excelbanter.com/excel-worksheet-functions/156370-date-format.html)

ExcelHelpNeeded

Date format
 
I have a date format - 5/31/06 10:30 AM

1. How would I get just the month and year?
2. What formula can I write that tells me that this date was 16 months
ago from August of 2007.

Thanks,

RB


Ron Rosenfeld

Date format
 
On Wed, 29 Aug 2007 16:11:19 -0700, ExcelHelpNeeded
wrote:

I have a date format - 5/31/06 10:30 AM

1. How would I get just the month and year?


Either just format it as "Format/Cells/Number/Custom Type "mmm-yyyy"

or use the formula

=text(cell_ref,"mmm-yyyy")

or some similar format.


2. What formula can I write that tells me that this date was 16 months
ago from August of 2007.


=datedif(early_date,later_date,"m")

where early_date and later_date are cell references.
--ron


All times are GMT +1. The time now is 01:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com