BookmarkSubscribeRSS Feed
RSB
Calcite | Level 5 RSB
Calcite | Level 5

I have a Prompt for the Reporting date in my report. The value of the Reporting date from the prompt is being displayed in the Report using a Text Box .

For Eg. If I select the value March 31, 2011 in the prompt the value that is being displayed in the report is appearing as 31Mar2011.

Is there a way we can format this value and display it as 31-Mar-2011.

Thanks.

2 REPLIES 2
Madelyn_SAS
SAS Super FREQ

Generally, you have two options:

In the information map, edit the expression for the date using the PUT function, like this

STRIP(PUT(<<table.date>>,DATE11.))

and change the data Type to Character. You would also need to modify the prompt to be a Text prompt and not a Date prompt. If you use this method, then you cannot use a calendar control for the prompt.

If you need to use the calendar control, then your only option will be to select the date as a group break in the report. The selected date will appear as formatted in the group break label. You would also have to remove the Text object and hide the Applied filters text because the date willl appear unformatted in those places.

RSB
Calcite | Level 5 RSB
Calcite | Level 5

We are using a calander control for date selection and it is not based on the data items.

Though I have not tried applying the group breaks I can tell that we cannot control the position of the label, which does not help in our case since we have to display that at the top right corner of the report layout and I guess using the Text Object is the only option for us.

Thanks.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1460 views
  • 3 likes
  • 2 in conversation