Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default 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

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
Date Functions Sean.rogers Excel Worksheet Functions 5 April 16th 08 08:58 PM
date functions meeric Excel Worksheet Functions 1 November 28th 07 07:01 PM
Date Functions [email protected] Excel Discussion (Misc queries) 1 March 24th 07 10:23 AM
Date Functions Jules Excel Discussion (Misc queries) 4 July 5th 06 05:55 PM
Date and Sum functions (HELP) aaronr Excel Discussion (Misc queries) 2 April 19th 06 07:30 PM


All times are GMT +1. The time now is 04:39 AM.

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"