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!

Combining Date Parameters with a String

Status
Not open for further replies.

pokerace

Technical User
May 24, 2005
118
0
0
US
C10
Interbase
Exporting to Excel

I have two parameter fields for a start date and an end date.

I want to creat a formula that will combine those with a "-" in between so that if the it would look like 20061001-20061031

When I try to combine them with a formula like this
{StartDate}+"-"+{EndDate} it tells me that I need a number for the dash string.

I tried to ToText to convert those paraneters in the formula first, but that didn't seem to work either. Is there a way to do it and if so, can I still choose the date formating once I insert this formula?

 
Where are you displaying the results of this formula?

I've created numerous reports in which we use something similar to show the user the date range of the data returned. Something like:

This report is for data from 20061001-20061031

I would put that in the report header under the report title or a logo or what have you.

The way I would do it is to insert a text box into the section I want this to display in, drag the first parameter into the box, type the '-' then drag the second parameter to the right of the '-'.

That's always worked well for me.
 
Ooops, typo:

totext({StartDate},"yyyyMMdd")+"-"+totext({EndDate},"yyyyMMdd")

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top