473,588 Members | 2,474 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to convert short time into a decimal

6 New Member
I'm using MS access. I created a query that calculates elasped time, results are returned in a short time format. I now need to add to the query a way to convert the short time into a decimal... example (14:30 into 2.5).
Dec 13 '10 #1
1 5637
MikeTheBike
639 Recognized Expert Contributor
Hi

If the query calculates an elapse 'Time' (ie. the difference between two Time or Date fields) then the result will be a decimal number (less than one if less than 24 hours).
This calculated result should not be formated as time (or date) but left as a number. To turn this into decimal hours, multilpy the result by 24.

Hope that makes sense!

MTB
Dec 14 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
20120
by: Dean G | last post by:
I need to compare two values. one from a text field 'bid' and the other from a field in an sql server database 'maxbid'. The problem is the column in the database has decimal as its data type and i'm getting a type mismatch. does anyone know how to convert 'bid' into decimal from varchar? the field datatype doesnt necessarily have to be decimal although i need two decimal places so it cant be an int. Thanks, Dean
8
18773
by: Chris | last post by:
Sorry, This should be simple, but brain is hurting... How do I convert a Current Time to a Decimal 6,0 (HMS)? There must be a cleaner way then this: Insert into Table Values Dec( Substr(Char(CURRENT TIMESTAMP),12,2) ||
0
2089
by: Galina | last post by:
Hello My form is based on a query returning rows of a table. Practically, it is based on a table, so simple the query is. A field on the form is formatted as short time. The column in the table, on which this field is based, is also formatted as short time. When the form opens, everything is OK, the time field shows time as it should. When user clicks in this field to edit it, the field all of a sudden starts showing date 1/01/1900 +...
3
15819
by: Omer kamal | last post by:
Dear all, I want to save my data into MS Access database Table which consist of some fields with short date and short time formats. I try to save data in to the said table and I am getting error that my SQL statment is not correct. string strSQL = @"INSERT INTO Activities ( Task,Day,Start,Finish ) VALUES ( '"+id+"', '"+date+"', '"+start+"', '"+finish+"' )" ;
2
13261
by: elena | last post by:
Hi, All Please, i need help with cast string to DateTime: DateTime dt = new DateTime(2006,09,17); it works i can update Field in Access DB Next field is Short Time data type, how i can cast string myTime = "13:30"; elena
2
15191
karthickbabu
by: karthickbabu | last post by:
Hi In my application i want to convert integer to decimal. I get a input and using convert function to convert into decimal. But it shows as it self. My code like as below, Is any wrong in my code dim input as long // I declare as long dim decimaloutput as decimal decimaloutput = Convert.ToDecimal(input) label1.text = decimaloutput.ToString()
8
2801
by: Lewe22 | last post by:
I have 2 fields in a table called and . They are both in short time format. I am displaying these in a form with a calculated field to show the time duration as well. (ie. = -) this is also displayed in short time format. Example start time end time duration 12:00 12:50 00:50 12:00 13:10 01:10 12:00 13:59 01:59 12:00 14:45 02:45
7
2136
by: Ecohouse | last post by:
I'm working on a project that was dropped in my lap. It is in Access 2003. There are short time fields which get calculated values (eg. 1:30). But I will need to total up those values for reports in qiueries. When I tried to drop one of the fields in the query builder and used the total function the totals was way off. So I was wondering what would be the best way to do this? Thanks in advance for the help.
5
10061
by: arial | last post by:
Hi all, I have a sql .bak file which i need to convert into xml file. can someone help with this? pointing out to some tutorial or some suggetion on how to start? Thak you,
1
8290
by: lenora | last post by:
How to convert string to decimal ? input - output 45 - 45.00 45.5 - 45.50 45.51 - 45.51 Thank you in advance
0
8228
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8357
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7987
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
5729
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5398
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3847
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2372
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1459
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1196
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.