Joined: 01 Aug 2014
Online Status: Offline
Posts: 2
Topic: Bad Date format Posted: 12 Nov 2014 at 6:30am
Hello,
I am new to this forum. And relatively new to Crystal.
I am using Crystal 11. I need to get a count of tickets that were closed within 3 days. I have a {ClosedDate} field that is a string. I am not sure the plan of attack to take here.
I have tried creating a formula to convert the string to a date and then to the correct date format seen below.
If datediff("d", cdate(ToText(cDate({CallLog.ClosedDate}),"MM/dd/yyyy")),cdate(ToText(cDate({?Date T0}),"MM/dd/yyyy"))) >3 then "1" else "0"
I also tried simplifying it to (Date({CallLog.ClosedDate}) = (CurrentDate-3))
None of which are working for me. I hope this is clear. Its hard to relay something when you arent really sure what you are talking about.
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 12 Nov 2014 at 8:09am
partially depends on what your strings look like and if they also have time involved and that is a factor and what you mean by 3 days? 3 days from what? your paramter field? Today? A start date in the record?
generally speaking it should be something like this
Joined: 01 Aug 2014
Online Status: Offline
Posts: 2
Posted: 12 Nov 2014 at 8:36am
I am trying to compare RcvdDate to ClosedDate.
I need to know tickets that were closed within 3 days of the RcvdDate, as well as 5Days, and Greater than 5 days. The format of the date string is YYYY-MM-DD.
When I create a formula like the one mentioned above and add it to a Running total formula I get "Bad Date Format"
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