Focal Point
creation of time dimension

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/1381057331/m/3821048331

March 22, 2005, 09:57 AM
<Renuka>
creation of time dimension
Hi,

I could see the date function for year, month etc, but not quarter.
Could you please help me in creating Quarter field in SQL Calculator using SQL columns in iWay(Data Management Console).

Thanks,
Renuka
March 22, 2005, 01:18 PM
TexasStingray
What you need to do is define a field in the metadata (Master File Description .mas file) called something like Quarter with the format of Q and have it equal a date field (I believe the field needs to be of format something like YYMD, YYM, YM, MYY, MY, MDYY etc..).
March 23, 2005, 04:00 AM
<Renuka>
Hi,

As there is no format of Q in the date functions in .mas

Is there any function to extract Quarter from the date.

Thanks,
Renuka
March 23, 2005, 11:28 AM
j.gross
There is no /Q date format, just as there is no /M format: Without a Year component, M and Q are just components (with limited range), not points in an unlimited series of "dates".

Cast your /YYM to /YYQ, and that to /I5YYQ, and extract its units digit via EDIT(,'$$$$9') or IMOD(,10,) to a /I1.
May 12, 2010, 01:02 PM
<José Andrés Vargas Aguilar>
Perhaps you want to try getting the quarter of the date from the data source.

Oracle, for example, has the very usefull TO_CHAR() and TO_DATE() functions.