dleggett Posted September 29, 2003 Posted September 29, 2003 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
Wendy T Posted September 30, 2003 Posted September 30, 2003 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
dleggett Posted September 30, 2003 Author Posted September 30, 2003 Thanks for the tip. Here is what worked for me: TimeLeft=Case(EndDate > Status(CurrentDate), DaysLeft & " days", EndTimeEST > Status(CurrentTime),TimeToText(HoursLeft), "Ended")
dleggett Posted September 30, 2003 Author Posted September 30, 2003 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")
Recommended Posts
This topic is 7795 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now