Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display Date range

Status
Not open for further replies.

twes3

Programmer
Jun 1, 2004
16
US
Ok...The user enter a parameter start date as '20050101' and a end date as '20050131'. The parameter has a string value type. In my database the field is a 11 char field so I used a forumla to give me the first 8.

I just want to display whatever the user inputted into a true date version on the report like '01/01/2005 to 01/31/2005'.

Any suggestions?
 
I forgot to mention I am only using one parameter called 'REPORT DATE' as a date range option.
 
You're going to need 2 formulas:

(Assuming the start date is less than the end date)....


@StartDate:
minimum (date(left(?YourParameter,4),mid(?YourParameter,5,2),
mid(?YourParameter,7,2)))

@EndDate:
maximum (date(left(?YourParameter,4),mid(?YourParameter,5,2),
mid(?YourParameter,7,2)))

Then in a text box:

Date Range selected between @StartDate and @EndDate

You may need to right click on the formulas to "Format Text" to get it to look like you want.


DataDog
'Failure Is Not An Option'
 
I think each of the three arguments within date() need to be wrapped in val() for this to work.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top