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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Format in Report

Status
Not open for further replies.

Anu1284

Programmer
Sep 24, 2003
25
0
0
US
Hi,

My report requires two input date parameters. Based on the input parameters, the data is retrieved from DB2.
I created a report prompt for the 2 input parameters.

Please find below the condition:

Absence Begin Date between Prompt(Enter the Report Begin Date (mm/dd/yyyy)) and Prompt (Enter the Report End Date (mm/dd/yyyy)

My requirement is to validate the date format at user input itself. If the user enters a date other than mm/dd/yyyy format, there should be some restriction at User response itself. I'm unable to incorporate this condition.

The universe object "Absence Begin Date" is in the format "mm/dd/yyyy".
Please let me know how to impose this condition at the user response itself.

Thanks,
Anu
 
I think good practice would be to use a list of values on the object 'Absence Begin Date'.

This will automatically stimulate the user to choose an existing date in the correct date format.

Why do you deviate from the standard DB2 date format?

T. Blom
Information analyst
tbl@shimano-eu.com
 
I understand that list of values would resolve this to a greater extent.

A scenario that restricts using LOV:
Assume Absence Begin Date starts from 10 Oct 2003 in the DB. If the user needs to run a report from 01 Jun 2003 to 31 Jun 2003, he should be able to run the report though there will not be any data for display. LOV will restrict the selection of the input parameter.

Is there a way to get this stuff validated before fetching the data? Please let me know.
 
A typical solution to your predicament is to have a calenderfile joined to the table containing the Absence begin date.

Typical calendertables I use have a date range from , say 1-1-2000 up to 12-31-2010.

Anyway, the only snatch is to make sure that the calenderfile spans the date date-range of the facttable.

If you now base the List of values on the date field of the calender-table your user will have both the correct format and he/she can select through the LOV in ANY case.

Calendertables are one of the must underestimated goodies to solve date problems.

If you need a ready to use calender-table for DB2 drop me a mail and I'll send you one............

T. Blom
Information analyst
tbl@shimano-eu.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top