By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,462 Members | 1,126 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,462 IT Pros & Developers. It's quick & easy.

how to convert decimal no time format to original time format with query in ms access

P: 11
Please help me some one.

Real time format

I have Field i.e [worked_Hrs), in that all entries are number time format, so i need convert with query like Original time format below are the example.

All rows like

[worked_Hrs] Query Result (Hours:Minutes)

0.17 as 0.10
0.25 as 0.15
0.50 as 0.30
0.75 as 0.45
1.50 as 1.30

please send me ms access query.


Thank you
Jan 23 '15 #1
Share this Question
Share on Google+
5 Replies


Rabbit
Expert Mod 10K+
P: 12,430
If you are looking to convert it to a date time data type: multiply the number by 60, round to the nearest integer, and then use the DateAdd function to add that many minutes to midnight.

If you are looking to convert it to a string: Take the whole number as the number of hours. Take the fractional and multiply it by 60, rounded to the nearest integer as the number of minutes. Concatenate the results with a colon separator.
Jan 23 '15 #2

P: 11
i can not understand, please explain in details.
Jan 23 '15 #3

P: 11
0.25 query result as 0.15, please send me ms access query
Jan 23 '15 #4

Rabbit
Expert Mod 10K+
P: 12,430
Which part don't you understand? Please provide more detail.

Sorry, I prefer to guide someone to an answer as opposed to providing full code. Please make an attempt at the solution using the algorithm specified. If you get stuck somewhere, provide the code you tried and describe where you are stuck.
Jan 23 '15 #5

P: 11
thank you for your suggestion. i got it now.
Jan 24 '15 #6

Post your reply

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