UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> time calculation in vb background of form    
 
   
mrbudgie
post Sep 24 2007, 08:38 AM
Post #1

New Member
Posts: 14



i have a if statement in the VB background of a form basicly saying:

if fieldname > 10:30 then
ect........


the 10:30 is not a time but an amount of hours so how do i put that into my if statement

cheers ian
Go to the top of the page
 
+
ScottGem
post Sep 24 2007, 08:42 AM
Post #2

UtterAccess VIP / UA Clown
Posts: 25,214
From: LI, NY



Access stores date/time values as a double precision number where the integer portion is the number of days since 12/30/1899 and the decimal portion is a fraction of a day (ex: 6AM or 6 hrs = .25)

So, you would take 10.5 divide by 24 and get a number that you would check against.
Go to the top of the page
 
+
Peter46
post Sep 24 2007, 08:43 AM
Post #3

UtterAccess VIP
Posts: 7,442
From: Oadby Leics, UK



What data type are you using for 'fieldname' ?
Go to the top of the page
 
+
mrbudgie
post Sep 24 2007, 09:01 AM
Post #4

New Member
Posts: 14



the datatype for the field name i think is set as short time
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 20th June 2013 - 07:00 AM