<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>JVan's Feed - Programmer's Heaven</title>
    <link>http://www.programmersheaven.com/feed/User/368564/RSS.aspx</link>
    <description>Events at Programmer's Heaven related to the user JVan.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Wed, 19 Jun 2013 12:28:29 -0700</pubDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <item>
      <title>Compare date / time &lt; 5</title>
      <link>http://www.programmersheaven.com/mb/AccessAndVB/411070/411070/ReadMessage.aspx#411070</link>
      <description>&lt;p&gt;Posted a '&lt;a href="http://www.programmersheaven.com/mb/AccessAndVB/411070/411070/ReadMessage.aspx#411070"&gt;new message&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/AccessAndVB/Board.aspx"&gt;Access databases and VB&lt;/a&gt; forum.&lt;/p&gt;Hi All;&lt;br /&gt;
&lt;br /&gt;
Struggling with something I just can’t get right, label1 display a last transaction date/time which I get from a date base throw a query label2 is the system date/time. I have a timer that execute a command button after executing the command button I want to check if the date/time in label1 is smaller than 5 minutes and if so then I get a massage. But I don’t know how all my code fails to perform this function help will be much appreciated.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
Private Sub Command1_Click()

Dim date1 As Date
Dim date2 As Date

    
date1 = Format(Now, "yyyy/mm/dd hh:mm:ss")
date2 = Format(label1, "yyyy/mm/dd hh:mm:ss")
If DateDiff("n", date1, date2) &amp;lt; 2 Then
   MsgBox ("Not Vending")
 End If
End Sub
&lt;/pre&gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
Private Sub Command1_Click()
Dim date1 As Date
Dim label1 As Date
    
date1 = Format(Now, "yyyy/mm/dd hh:mm:ss")
date2 = label1
If DateDiff("m", Now, date1) &amp;gt; DateDiff("m", Now, label1) Then
   MsgBox ("Not Vending")
 End If
End Sub
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Also&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
Private Sub Command1_Click()

If DateDiff("n", Now, label1) &amp;gt; 5 Then
   MsgBox ("Not Vending")
 End If
End Sub
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/AccessAndVB/411070/411070/ReadMessage.aspx#411070</guid>
      <pubDate>Mon, 21 Dec 2009 23:25:04 -0700</pubDate>
    </item>
  </channel>
</rss>