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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vijaykk028
    New Member
    • Dec 2014
    • 11

    #1

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

    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
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    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.

    Comment

    • vijaykk028
      New Member
      • Dec 2014
      • 11

      #3
      i can not understand, please explain in details.

      Comment

      • vijaykk028
        New Member
        • Dec 2014
        • 11

        #4
        0.25 query result as 0.15, please send me ms access query

        Comment

        • Rabbit
          Recognized Expert MVP
          • Jan 2007
          • 12517

          #5
          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.

          Comment

          • vijaykk028
            New Member
            • Dec 2014
            • 11

            #6
            thank you for your suggestion. i got it now.

            Comment

            Working...