Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Ordering dates previously converted to string Post Reply Post New Topic
Author Message
ricky969
Groupie
Groupie
Avatar

Joined: 03 Jul 2008
Location: United States
Online Status: Offline
Posts: 53
Quote ricky969 Replybullet Topic: Ordering dates previously converted to string
    Posted: 09 Feb 2012 at 6:09am

I had to convert a date into string in order to use the value in a if-then statement

if {?group} = 0 then ToText(Date{DateTimeValue}), "MM-dd-yyyy")
else if {?grou} = 1 then {someStringValue}
else {someOtherStringValue};
 
If i pick 0 (zero) i need to group the report by DATE DESCENDING but having to deal with a string, the dates are not ordered properly (** see example below)
 
01-09-2012
01-20-2012
02-05-2012
03-01-2011**
 
Is there a workaround that i could use?
 
Thanks
 
Rick
 
 
IP IP Logged
ricky969
Groupie
Groupie
Avatar

Joined: 03 Jul 2008
Location: United States
Online Status: Offline
Posts: 53
Quote ricky969 Replybullet Posted: 09 Feb 2012 at 7:13am
i found a sort of workaround by formatting the string as yyyy-MM-dd instead of MM-dd-yyyy but that's not usually how we display the dates on our reports.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.018 seconds.