<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gravity Support Forums Topic: Calculate Time Difference</title>
		<link>https://legacy.forums.gravityhelp.com/topic/calculate-time-difference</link>
		<description>Gravity Support Forums Topic: Calculate Time Difference</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 02:52:10 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/calculate-time-difference" rel="self" type="application/rss+xml" />

		<item>
			<title>David Peralty on "Calculate Time Difference"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/calculate-time-difference#post-69701</link>
			<pubDate>Mon, 06 Aug 2012 13:30:11 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">69701@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Beautiful code. Good job.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>HeavyMetalAdam on "Calculate Time Difference"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/calculate-time-difference#post-69700</link>
			<pubDate>Mon, 06 Aug 2012 13:27:13 +0000</pubDate>
			<dc:creator>HeavyMetalAdam</dc:creator>
			<guid isPermaLink="false">69700@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Couldn't get back to this for a bit, but if anyone else is interested, here's the code I through together successfully....&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://pastebin.com/hySGFnLt&#34; rel=&#34;nofollow&#34;&#62;http://pastebin.com/hySGFnLt&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Peralty on "Calculate Time Difference"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/calculate-time-difference#post-67576</link>
			<pubDate>Mon, 23 Jul 2012 16:05:41 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">67576@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;To do that, you'll need to do some PHP coding.&#60;/p&#62;
&#60;p&#62;Create a field called length.&#60;br /&#62;
Check off it being allowed to be populated dynamically&#60;br /&#62;
Give it a CSS class of hidden&#60;br /&#62;
In your style.css add:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;.hidden { display: none; }&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;In your functions.php file you will want to use the following hook:&#60;br /&#62;
&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_pre_submission&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Gform_pre_submission&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;And then look at the following information:&#60;br /&#62;
&#60;a href=&#34;http://php.net/manual/en/function.date.php&#34; rel=&#34;nofollow&#34;&#62;http://php.net/manual/en/function.date.php&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://stackoverflow.com/questions/676824/how-to-calculate-the-difference-between-two-dates-using-php&#34; rel=&#34;nofollow&#34;&#62;http://stackoverflow.com/questions/676824/how-to-calculate-the-difference-between-two-dates-using-php&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;At the end, you should have an invisible form field that upon submission of the form gets the value of the difference between the two dates.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>HeavyMetalAdam on "Calculate Time Difference"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/calculate-time-difference#post-67571</link>
			<pubDate>Mon, 23 Jul 2012 15:13:17 +0000</pubDate>
			<dc:creator>HeavyMetalAdam</dc:creator>
			<guid isPermaLink="false">67571@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Just stored with the entry so it's available in the results/export.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Calculate Time Difference"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/calculate-time-difference#post-67557</link>
			<pubDate>Mon, 23 Jul 2012 14:30:37 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">67557@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Does the length of time need to be available in the form before submission for a calculation, or does it just need to be stored with the entry?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>HeavyMetalAdam on "Calculate Time Difference"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/calculate-time-difference#post-67544</link>
			<pubDate>Mon, 23 Jul 2012 12:50:39 +0000</pubDate>
			<dc:creator>HeavyMetalAdam</dc:creator>
			<guid isPermaLink="false">67544@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;In my form, I have a start time and end time.  I would like to have a dynamically calculated field that contains the length of time from start time to end time.  &#60;/p&#62;
&#60;p&#62;I can't seem to find anything like this already in the forums or documentation, and the calculation field seems to exclude the time fields.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
