Project and Portfolio Management Practitioners Forum
cancel

display date for sysdate+5

SOLVED
Go to solution
Highlighted
Raj Ghimire
Outstanding Contributor.

display date for sysdate+5

Hi,
I am getting a little confused with one requirement that we are currently facing.
I was pretty easily able to use sysdate+5 to get date for the five days after current date in PPM rules and workflow commands.
But now, I have a need to display the date in email that is being sent from PPM.
Of Course '[SYS.DATE]+5' would not display the date correctly as it will display something like 03-01-2010+5.

Can any of you guys can give me a quick tip on this regard ?
Will appreciate your help.
-Raj
7 REPLIES
Jim Esler
Acclaimed Contributor.

Re: display date for sysdate+5

You can use the Oracle to_char function to format a date string any way you want. Check out http://www.psoug.org/reference/date_func.html for examples.
Raj Ghimire
Outstanding Contributor.

Re: display date for sysdate+5

Thanks Jim , But I don't think I can use any query in notification templates. I can only utilize TOKENS in Request.
So, I don't think it is possible to use TO_CHAR function in notifications. Is it ?
- Raj
Jim Esler
Acclaimed Contributor.
Solution

Re: display date for sysdate+5

I have used rules to populate hidden fields with strings in the format I needed for commands or notifications.
Raj Ghimire
Outstanding Contributor.

Re: display date for sysdate+5

Thanks Jim. That is exactly how we are acomplishing the task right now but were wondering if there was a way we could do that without having to depend on the additional fields (which we have in Plenty :-) .
Thanks for the Suggestion though !
-Raj
Erik Cole
Acclaimed Contributor.

Re: display date for sysdate+5

Here's a crazy thought...maybe you could make your own token, based off of the DATE one? The SQL is stored in KNTA_ENTITY_TOKENS:

select *
from KNTA_ENTITY_TOKENS
where TOKEN = 'DATE'

I have NOT tried this, but it sounds like an interesting experiment...
Raj Ghimire
Outstanding Contributor.

Re: display date for sysdate+5

Thanks Eric.
Never thought of that before.
I will give it a try and bring this up with my team to see if they agree as well.
It would have been so much better if the application allowed us to create such TOKENs directly through the WB though.
For now, I am still pushing to utilize another Non-Visible field :-)
Thanks.
-Raj
Jim Esler
Acclaimed Contributor.

Re: display date for sysdate+5

Instead of using a separate hidden field, you could have your rule populate the hidden value of the regular field with the reformatted date, leaving the visible value as is. I have not tried this with a Date field but it works well in other cases.