Is there any DQL to fetch only the month ?
Hi Lavanya,
Are you looking to fetch month alone from any attributes like creation date of modified date etc.. If yes I hope below dql will help.
select SUBSTR(r_creation_date,4,3) as datemonth from dm_document where r_object_id='<<Object ID>>
Regards,
Raja
Thanks for the response. But I need to fetch the month string like "September" not in other forms,
If i use DATETOSTRING(r_creation_date, 'Month,yy') am able to get month name but along with that am getting year also like "June , 2014".Is there any possiblity to fetch only the month.
Only way as per my understanding is better to get it as data time attribute from DQL and use java string functionality to get the appropriate format you need.
Hello Lavanya,
Could you please try this, it will return the month as JAN, FEB, MAR etc.
select r_object_id, r_creation_date , SUBSTR(r_creation_date, 4, 3 ) as only_Month from dm_document enable (RETURN_TOP 5)
Rintu