Generating dates with Q's
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello,
I'm looking for better (more elegant) solution than mine
I want to create the dates between starting and ending date. Next I need to add quarters starting from start date. (e.g. 01.12.2012 - 28.02.2013 - Q1 etc.)
Solved! Go to Solution.
- Labels:
- Datasets
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
hi @Wojtek_Dz
>Next I need to add quarters starting from start date. (e.g. 01.12.2012 - 28.02.2013 - Q1 etc.)
Can you clarify what does it mean? For example, why the following records fall in "2013 Q1", while 2012-12-01 & 02 are within 2012-Q4.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi , the field "Quarters" is calculated from the field "Date_Q_2". As per the condition you have mention in the calculation, the Quarters should be calculated from the field Date_Q. Else you can update the calculation for Date_Q_2, by replacing field DateGenerate with LastDateGenerate.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @gawa
in the normal case Q1 is 01-03.2013. But in my case the FY is starting at 01.12.2012 (dd.MM.yyyy). (one month earlier then in normal case).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Aryasuta_PandaIn normal case yes, but my FY is starting from 01.12.2013, and from this date I need to create the Quarters (01.12.2012-28.02.2013 - Q1 etc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
hi @Wojtek_Dz I got it. Then, you can go with the following Formula expression. I added this Formula tool as a new container in the attached WF.
//Year
ToString(DateTImeYear([StartDate])+1+
DateTimeDiff([DateGenerate],[StartDate],"year"))
+" "+
//Quarter Number
"Q"+ToString(Floor(Mod(DateTimeDiff([DateGenerate],[StartDate],"month"),12)/3)+1)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
nice @gawa thanks !
