I'm using DateDiff to display a 'countdown' to an expiry date - pulling the expiry date/time from a field in the database, and comparing it against the current time.
I then use CFSET to display the number of hours and a separate one for minutes, however the minutes are the total minutes (i.e 2 Hours displays as 2 Hours / 120 Minutes).
The Hour and Minutes display are shown seperately (for styling purposes), so I need them to be displayed as separate elements.
So, effectively what I want to display is (assuming the expiry time is 2 hours, 15 minutes away);
This is what I have so far to work with;
<cfset e_hours = #datediff("h",now(),expires)#>
<cfset e_mins = #datediff("n",now(),expires)#>
I'm fairly sure I can simply do some mathematical additions to the minutes to remove the hours from the figure, but everything I've tried so far has not been accurate. Any pointers much appreciated!