My Assistant
![]() ![]() |
|
|
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 |
|
|
|
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. |
|
|
|
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' ?
|
|
|
|
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 Top · Lo-Fi Version | Time is now: 20th June 2013 - 07:00 AM |