<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>How to convert a Double to days hours minutes</title><link>https://www.infopathdev.com:443/forums/thread/101573.aspx</link><pubDate>Fri, 06 Mar 2015 16:50:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:101573</guid><dc:creator>Caeanis</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/101573.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=101573</wfw:commentRss><description>&lt;p&gt;I have a form that calculates the number of minutes for a given project.&amp;nbsp; Some may only take minutes, some hours, some several days.&amp;nbsp; I am wondering how to take an integer or double and return the corresponding days, hours, minutes etc. &lt;br /&gt;I have seen several posts that explain how to do the reverse which is convert date picker values to a number but I&amp;#39;m not sure how to go about this the other way.&lt;br /&gt;&lt;br /&gt;I think the basic logic would be:&lt;br /&gt;Round the double up to an integer:&lt;br /&gt;floor(Double)&lt;br /&gt;If this result is greater than 1440 (minutes in a day)&lt;br /&gt;days = floor(Double)/1440&lt;br /&gt;hours = ((floor(Double)/1440)-1140)/60&lt;br /&gt;minutes = (((floor(Double)/1440)-1140)/60)-60&lt;br /&gt;&lt;br /&gt;Not quite sure if this is right, and not sure how to write this formula. Any help would be appreciated.&lt;br /&gt;&lt;br /&gt;Marc&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>