on 07-01-2014 5:55 PM
Hello Gururs,
I need to Create a predefine condition in Information Design Tool to see Month value from date value.
Can anyone please help?
Regards
P.Mangal
Just to be clear, do you mean display the year/month from a given date?
So for today you'd want to see something like 2014-07?
The main function that you will need is EXTRACT, e.g. EXTRACT(Month from table.column)
Alternatively you could cast but it is a bit more complex:
cast ((cast(table.column as format 'mmm')) as char(3)
Regards,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Find the below sample code
If your Db is SQl
select
DATE_ID as DATE_ID,
'Current month' as Periods
from td_Date
where
CalendarDate between DATEADD(mm,DATEDIFF(mm,0,GETDATE()),0)and DATEADD(ms,- 3,DATEADD(mm,0,DATEADD(mm,DATEDIFF(mm,0,GETDATE())+1,0)))
union all
or SELECT CAST(MONTH(SYSDATETIME()) AS VARCHAR(2)) as [M]
If your database is BW...try to implement at the bex query level.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.