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

date conversion in a string parameter field 1

Status
Not open for further replies.

dison

Technical User
Apr 20, 2005
20
GB
Hi all.

Im using a grouping on a string parameter field to dynamically sort my report. However one of the fields I would like to sort on is a date field. When i convert this to text it is obviously not working correctly. Any ideas on how to do this?. Thanks.
 
Why do you need to convert it to text at all? Sorting on the original datefield should be adequate.

If this is not possible, can you provide an example of what you want compared to what you're currently experiencing?

Naith
 
ok right I have done this so far:

if {?sort order} = "Street" then {swrsites.street} else

if {?sort order} = "Design Status" then {streets.x_designst} else

if {?sort order} = "Estimated Start" then

({swrworks.eststart})

and the ?sort order is a sting parameter.

Help!

When I try and run the above formula is falls over saying a string is required here
 
Try basing your date sort on
Code:
ToText(Year({Your.Date}),0,"")+
ToText(Month({Your.Date}),0,"")+
ToText(Day({Your.Date}),0,"")
You can display the original date instead of this output.

Naith
 
Try this:

Code:
if {?sort order} = "Street" then {swrsites.street} 
else 
if {?sort order} = "Design Status" then {streets.x_designst} 
else 
if {?sort order} = "Estimated Start" then 
ToText( {swrworks.eststart},"yyyy/MM/dd" )

Bob Suruncle
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top