ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   DATE Functions??? (https://www.excelbanter.com/excel-programming/297284-date-functions.html)

malay_ko

DATE Functions???
 
how will i classify the dates according to its quarter. lets say
10-02-03 (october 2, 2003) is it under 1st quarter, 2nd quarter, 3r
quarter,4th quarter of the year? what date function should i use? o
what do i have to do? pls help me with this. than

--
Message posted from http://www.ExcelForum.com


Bob Phillips[_6_]

DATE Functions???
 
Assuming the date is in variable myDate

month(myDate) mod 4 +1

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"malay_ko " wrote in message
...
how will i classify the dates according to its quarter. lets say,
10-02-03 (october 2, 2003) is it under 1st quarter, 2nd quarter, 3rd
quarter,4th quarter of the year? what date function should i use? or
what do i have to do? pls help me with this. thanx


---
Message posted from http://www.ExcelForum.com/




AA2e72E[_2_]

DATE Functions???
 
Try datediff

4-datediff("Q",firstdate,lastdayofyear

e.g

4-datediff("Q","01/09/2004","31/12/2004"

You may need to contruct lastdayofyear using "31/12/" & datepart("yyyy",firstdate



All times are GMT +1. The time now is 04:33 PM.

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