#MONTH function not working?

Posted by ithrees.ai on 28-Apr-2014 06:10

Hi,

It says 'invalid character' when I use "#MONTH(date)" function to get the number of the given date..?
What could be the issue..?

Thanks in advance,
Ithrees

Posted by Pradeep Kagithalagudem on 28-Apr-2014 07:42

Hi,
 
#MONTH token is supposed to be used in following cases

·         When Creating View with Filtering based on expression. We can use #MONTH token in formula fitered field. Please see chapter 3 in Rollbase in Action for details.

·         In Query API, Select Query Where clause. Ex : rbv_api.selectQuery("SELECT {!id} FROM test111 where {!#OBJ_ID.test111} <= #MONTH('21-07-2014')",20) . Please see chapter 6 in Rollbase in Action for details

 
Thanks
Pradeep
 
[collapse]
From: ithrees.ai [mailto:bounce-ithreesai@community.progress.com]
Sent: Monday, April 28, 2014 4:42 PM
To: TU.Rollbase@community.progress.com
Subject: #MONTH function not working?
 
Thread created by ithrees.ai

Hi,

It says 'invalid character' when I use "#MONTH(date)" function to get the number of the given date..?
What could be the issue..?

Thanks in advance,
Ithrees

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

All Replies

Posted by Pradeep Kagithalagudem on 28-Apr-2014 07:42

Hi,
 
#MONTH token is supposed to be used in following cases

·         When Creating View with Filtering based on expression. We can use #MONTH token in formula fitered field. Please see chapter 3 in Rollbase in Action for details.

·         In Query API, Select Query Where clause. Ex : rbv_api.selectQuery("SELECT {!id} FROM test111 where {!#OBJ_ID.test111} <= #MONTH('21-07-2014')",20) . Please see chapter 6 in Rollbase in Action for details

 
Thanks
Pradeep
 
[collapse]
From: ithrees.ai [mailto:bounce-ithreesai@community.progress.com]
Sent: Monday, April 28, 2014 4:42 PM
To: TU.Rollbase@community.progress.com
Subject: #MONTH function not working?
 
Thread created by ithrees.ai

Hi,

It says 'invalid character' when I use "#MONTH(date)" function to get the number of the given date..?
What could be the issue..?

Thanks in advance,
Ithrees

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by ithrees.ai on 28-Apr-2014 08:05

Thank you for your reply Pradeep.

Is there any specific rollbase function to get the month number.. or we have to use javascript date function..?

Thanks and Regards,

Ithrees

Posted by kiran kumar Angara on 28-Apr-2014 08:11

Hi,

You can make use of the mentioned functions in the documentation based on your requirement. Find the below link with the examples.

documentation.progress.com/.../index.html

Thanks & Regards,

Kiran Avs.

Posted by ithrees.ai on 28-Apr-2014 08:19

Thank you Kiran,

But I dont see any of these api is returning a number (1-12) from a date like getMonth() in javascript..

Thanks and Regards,

Ithrees

Posted by Sharavan Kumar on 28-Apr-2014 09:19

Hi ,

I am Not sure if we have an APi which will give you month (number value) directly unlike in javascript . However , you can use rbv_api.formatDate() api and retrieve  month ( in number ) , as shown in below example .

var d= rbv_api.selectValue("select updatedAt from obj124 where id=?", {!id});

var x = rbv_api.formatDate(d, "MM");

rbv_api.println("x="+x);

output :- 04

Hope you find this useful .

Thanks,

Sharavan

Posted by ithrees.ai on 28-Apr-2014 10:12

Thank you Sharavan,

Its a good one..

Posted by psaradhi on 28-Apr-2014 11:06



Sent from my iPhone

On 28-Apr-2014, at 20:42, "ithrees.ai" <bounce-ithreesai@community.progress.com> wrote:

Reply by ithrees.ai

Thank you Sharavan,

Its a good one..

Stop receiving emails on this subject.

Flag this post as spam/abuse.

This thread is closed