September 29, 200322 yr Hi I have a specific enddate and endtime. what I would like to do is show the time remaining in one field. For example if there are 2 days left is will say 2, however if there is less that 1 day left it should show the hours and minutes left. I can do this as separate calculations, but can't figure out a way to show this in the same field, since they result in different calculation types (date or time). Is there a way of doing this. or is it impossible due to the different calculation result formats? Thanks
September 30, 200322 yr FM has functions called DateToText and TimeToText. Your final calc should be set to result in text. This is a very quick untested reply, but something like: case( EndDate < Status(CurrentDate), "the end date has passed", EndDate = Status(CurrentDate), TimeToText(put your time calc here), DateToText(put your date calc here) & " days" ) Hope that helps a bit. cheers, Wendy
September 30, 200322 yr Author Thanks for the tip. Here is what worked for me: TimeLeft=Case(EndDate > Status(CurrentDate), DaysLeft & " days", EndTimeEST > Status(CurrentTime),TimeToText(HoursLeft), "Ended")
September 30, 200322 yr Author Here is a slightly modified version with more accurate output: TimeLeft=Case(DaysLeft = "1", DaysLeft & " day", EndDate > Status(CurrentDate), DaysLeft & " days", EndTimeEST > Status(CurrentTime),TimeToText(HoursLeft), "Ended")
Create an account or sign in to comment