Lag in decimal

Hi all

I have an application that allows employees to enter a request for leave.  If they take a partial day, they enter the start and end time, and it is stored in the database as military time (for example: start - 13:00; end - 17:00).   I then display a list of vacation on an application of dashboard for managers to display.

Occasionally, an employee registers an hour such as 13:30 - 17:00.  I want to display it on the screen in the form of 3.5 hours.

My current application use DateDiff to calculate the time difference:

< cfset vacation_hours_taken = (DateDiff ("h", qryVacationPDO.time_started, qryVacationPDO.time_ended)) >

One, is there a better way to determine the difference in hours between the two times, and

Two, is there a way to convert the 3 hours and 30 minutes (03:30) in decimal format (3.5)?

Thanks for any help you can provide.

Kind regards

Robert

For simple a decimal value, enter the number of minutes instead.  Then divide by 60. You can use NumberFormat to tweak the output number.

dateDiff ("n", time_started, time_ended)

For fancy options, you can check the DateTime library at www.cflib.org. Chances are they have a function for what you do.

HTH

Leigh

Tags: ColdFusion

Similar Questions

  • reading file spreadsheet mode decimation

    Hello, I read a spreadsheet in decimation mode file. With the shift of offered and the choice of the number of line to read everything is ok. My problem appears when pour the n + 1 iterations I wish the 1st line or the last of the previous table.

    Pour recalculate them the offset, I divide (shift-offset on) by the number of lines to which I added + 1. Cel service but pay wholesale file I have a lag that appears certainly from the rest of the division. If QQ has a solution, I'm interested.

    Thank you

    Ludo

    Hello, I solved the problem by reading the last line alone in order to retrieve the offset of the file for the following conferences.

    Thank you

  • Safari hangs and lags while watching the video on youtube

    While watching therapy Unbox videos, the video hangs and lags. What's weird, is that only Unbox GAL of video therapy and I have not had this problem with any other channel. Confused! Help!?

    Try a reboot.

    Make a backup using Time Machine or a cloning program, to ensure that data files can be recovered. Two backups are better than one.

    Try to set up another admin user account to see if the same problem persists. If back to my Mac is enabled in system preferences, the guest account will not work. The intention is to see if it is specific to an account or a system wide problem. This account can be deleted later.

    Isolate a problem by using a different user account

    If the problem is still there, try to start safe mode using your usual account.  Disconnect all devices except those necessary for the test. Shut down the computer and then put it up after a 10 second wait. Immediately after hearing the startup chime, hold down the SHIFT key and continue to hold it until the gray Apple icon and a progress bar appear. Startup is considerably slower than normal. This will reset some caches, forces a check for directory and disables all start-up and connection, among other things. When you restart normally, the initial restart may be slower than normal. If the system is operating normally, there may be 3rd party applications that pose a problem. Try to delete/disable the third-party applications after a reboot using the UN-Installer. For each disable/remove, you need to restart if you do them all at once.

    Safe mode - on El Capitan

    Start Mode without failure-El Capitan.

  • return only the decimal value

    What function can I use to return only the decimal value of a formula

    (97 * 2.2) / 14 value returns 15.24

    I only want to use le.24

    Salvation is

    Use the formula - INT (formula)

    In the special case above:

    =(97*2.2)/14 - INT ((97*2.2)/14)

    You see two places to the right of the decimal separator in reason to be rounded off to the value real, in the shape of the cell to only show as two decimal places, either by setting the width of the cell close enough to force the rounding of the displayed value.

    Note that if the result is rounded (using the ROUND function) the actual value of the cell will be the rounded value. For the other two cases, the value displayed indicates only two decimal places, but the real value in the cell (and the additional calculations used by referring to this cell) is 0.242857142857144, which could lead to surprises in the results of the calculations downstream.

    Kind regards

    Barry

  • Thunderbird input lag except in safe mode

    Entry of a message (response or new) lagging behind unless Thunderbird is running in safe mode.

    I used the option to disable all add-ons and reset the toolbars and the problem persists unless Thunderbird is running in safe mode.

    Performance of the Task Manager indicates low CPU, memory and disk usage when the problem occurs.

    I'm using version 38.1.0 on Windows 7, Home Premium with all updates installed.

    The delay does not occur in Internet Explorer or Microsoft Word or other programs.

    Thanks for any help.

    Hi Wayne,

    Disabling hardware acceleration solved the problem.

    Thanks a lot for your answer.

  • lag so much on my gaming rig

    I built a gaming pc
    Data sheet:
    i5 4670 k
    8 GB ram
    NVIDIA 760
    And it works fine on everything except the browsers. It lags so much in any browser, including firefox. There are also ads that are not who are blocking the entire page. I have the ad blocker... Please help me. Thank you

    Hello

    This looks like a good spec! Congratulations on building your PC yourself.

    Sometimes a problem with Firefox can be a result of malware installed on your computer, you may not be aware of. Looks like this might be the case with those ads full screen you see.

    You can try these free programs to search for malicious software that work with your existing anti-virus software:

    Microsoft Security Essentials is a good permanent antivirus for Windows 7/Vista/XP, if you do not already have one.

    More information can be found in the article troubleshooting Firefox problems caused by malware .

    This solve your problems? Please report to us!

  • FCPX Play Back Lag! Help, please!

    I have Final Cut 10.2.1 and I get some serious reading lag! "I tried the obvious choice, best quality unclicking also change the proxy, but nothing works." Here are the clips shot from a camera Canon T3I 1080 p. I have troubleshooted this thing and I still get a reading. I don't know if it's my computer, because I just got an imac two months ago. I started Adobe Premiere pro cloud thinking it is the CPF, but reading it is trolling to! I thought it was my Ram, but I'm well below requirements. In addition, it's frustrating, because my wife and I edited a documentary set on a macbook pro with only 4 GB of Ram and it worked perfectly. I am at my end. The files are stored on an external hard drive, is not on my system. I can't think what's wrong with my system. My computer specs are in the background. Thank you!

    iMac (21.5 inch, end of 2015) processor 2.8 GHz Intel Core i5 8 GB 1867 MHz DDR3 memory Intel Graphics Iris Pro 6200 1536 MB graphics

    What type of disc external hard is exactly?

    Also, how is it formatted?

    Al

  • start to slow down, slow down everything and my lag total Tower (post etreCheck)

    This has been a problem for some time. I did audits of malware and that doesn't seem to be the problem.

    I have a marked difference in performance when the macbook is on the table against my knees, I do runsmcFanControl but I know that's not an overheating problem.

    I have a mid-2012 15-inch macbook pro running El Capitan 10.11.5

    I have only 4 GB of memory.

    Here's my etreCheck, there seems to be a lot of problems, but I don't know where to go from here:

    EtreCheck version: 2.9.12 (265)

    Report generated 2016-06-03 21:35:01

    Download EtreCheck from https://etrecheck.com

    Duration 16:55

    Performance: Poor

    Click the [Support] links to help with non-Apple products.

    Click [details] for more information on this line.

    Click on the link [check files] help with unknown files.

    Problem: Computer is too slow

    Description:

    Super lag on startup and basic operation

    Hardware Information:

    MacBook Pro (15-inch, mid-2012)

    [Data sheet] - [User Guide] - [warranty & Service]

    MacBook Pro - model: MacBookPro9, 1

    1 2.3 GHz Intel Core i7 CPU: 4 strands

    4 GB of RAM expandable - [Instructions]

    BANK 0/DIMM0

    OK 2 GB DDR3 1600 MHz

    BANK 1/DIMM0

    OK 2 GB DDR3 1600 MHz

    Bluetooth: Good - transfer/Airdrop2 taken in charge

    Wireless: en1: 802.11 a/b/g/n

    Battery: Health = Normal - Cycle count = 59

    Video information:

    Graphics Intel HD 4000

    NVIDIA GeForce GT 650M - VRAM: 512 MB

    Color LCD 1440 x 900

    Software:

    OS X El Capitan 10.11.5 (15F34) - since the start time: 8 days

    Disc information:

    HTS545050A7E362 disk HARD APPLE disk0: (500,11 GB) (rotation)

    EFI (disk0s1) < not mounted >: 210 MB

    Recovery HD (disk0s3) < not mounted > [recovery]: 650 MB

    HD hand (disc 1) /: 498,88 (Go 140,93 free)

    Storage of carrots: disk0s2 499.25 GB Online

    HL-DT-ST DVD - RW GS31N)

    USB information:

    Apple Inc. FaceTime HD camera (built-in)

    Apple Inc. Apple keyboard / Trackpad

    Computer, Inc. Apple IR receiver.

    Apple Inc. BRCM20702 hub.

    Apple Inc. Bluetooth USB host controller.

    Apple Inc. IPhone.

    Lightning information:

    Apple Inc. Thunderbolt_bus.

    Guardian:

    Mac App Store and identified developers

    Unknown files:

    ~/Library/LaunchAgents/.dat0573.001 (hidden)

    / System/Library/Frameworks/addressbook. Framework/Resources/AddressBookSourceSyn cScheduleHelper - scheduleSync 8E3A7CB5-2D52-42B7-A2D4-D3FEF9BCA40E

    A unknown file found. [Check files]

    Kernel extensions:

    / Library/Extensions

    [loading] com.globaldelight.driver.BoomDevice (1.4 - SDK 10.10 - 2016-06-03) [Support]

    / System/Library/Extensions

    com [no charge]. Cycling74.driver.Soundflower (1.6.6 - 10.6 SDK - 2016-06-03) [Support]

    com [no charge]. Ralink.driver.RT73 (1.1.4.0 - 2016-06-03) [Support]

    com.Cisco.NKE.IPSec [no charge] (2.0.1 - 2016-06-03) [Support]

    Launch system officers:

    [loaded] 8 tasks Apple

    [loading] 147 tasks Apple

    [operation] 67 tasks Apple

    [killed] 16 tasks Apple

    16 killed processes lack of RAM

    Launch system demons:

    [loaded] 44 tasks Apple

    [loading] 148 tasks Apple

    [operation] 83 tasks Apple

    [killed] 15 tasks Apple

    15 killed process lack of RAM

    Launch officers:

    [failure] com.adobe.ARMDCHelper.cc24aef4a1b90ed56a... plist (2016-05-11) [Support]

    [operation] com.google.keystone.agent.plist (2016-03-01) [Support]

    [operation] com.robohippo.HippoConnectAgent.plist (2014-02-13) [Support]

    Launch demons:

    [operation] com.adobe.ARMDC.Communicator.plist (2016-05-11) [Support]

    [operation] com.adobe.ARMDC.SMJobBlessHelper.plist (2016-05-11) [Support]

    [failure] com.adobe.fpsaud.plist (2016-05-09) [Support]

    [operation] com.google.keystone.daemon.plist (2016-03-01) [Support]

    [loading] com.malwarebytes.MBAMHelperTool.plist (2015-12-13) [Support]

    com.robohippo.HippoConnectDaemon.plist [no charge] (2014-02-13) [Support]

    User launch officers:

    [not responsible]. (hidden) dat0573.001 (2013-07-23) [Support]

    / System/Library/Frameworks/addressbook. Framework/Resources/AddressBookSourceSyn cScheduleHelper - scheduleSync 8E3A7CB5-2D52-42B7-A2D4-D3FEF9BCA40E

    [failure] com.adobe.ARM. [...]. plist (2014-09-03) [Support]

    [loading] com.adobe.ARM. [...]. plist (2014-01-19) [Support]

    [loading] com.citrixonline.GoToMeeting.G2MUpdate.plist (2015-10-05) [Support]

    Items in user login:

    smcFanControl Application (~ / Desktop/smcFanControl.app)

    iTunesHelper Application (/ Applications/iTunes.app/Contents/MacOS/iTunesHelper.app)

    Dropbox application (/ Applications/Dropbox.app)

    E-mail application (/ Applications/Mail.app)

    MediaFire Desktop Application (/ Applications/MediaFire Desktop.app)

    Other applications:

    [ongoing] com.eidac.smcFanControl2.88672

    [ongoing] com.globaldelight.BoomDaemon

    [loading] com.mint.quickview - Launcher

    [ongoing] com.Mint.Quickview.42912

    [loading] 394 tasks Apple

    [operation] 218 tasks Apple

    [killed] 32 tasks Apple

    Plug-ins Internet:

    AdobePDFViewerNPAPI: 15.016.20045 - SDK 10.11 (2016-06-03) [Support]

    Flash Player: 21.0.0.242 - SDK 10.6 (2016-05-12) [Support]

    JavaAppletPlugin: 15.0.1 - 10.11 (2013-11-01) check the version of the SDK

    AdobePDFViewer: 15.016.20045 - SDK 10.11 (2016-06-03) [Support]

    Center photo Plugin: unknown (2013-11-10)

    googletalkbrowserplugin: 5.41.3.0 - 10.8 SDK (2015-12-11) [Support]

    iPhotoPhotocast: 7.0 - 10.8 SDK (2013-04-19)

    QuickTime Plugin: 7.7.3 (2016-05-16)

    FlashPlayer - 10.6: 21.0.0.242 - SDK 10.6 (2016-05-12) [Support]

    NP_2020Player_IKEA: Unknown (2013-11-10)

    DivXBrowserPlugin: Unknown (2013-11-10)

    RhapsodyPlayerEngine: Unknown (2013-11-10)

    Silverlight: 5.1.30514.0 - SDK 10.6 (2015-02-09) [Support]

    Default browser: 601 - SDK 10.11 (2016-05-16)

    Flip4Mac WMV Plugin: Unknown (2013-11-10)

    o1dbrowserplugin: 5.41.3.0 - 10.8 SDK (2015-12-19) [Support]

    NPDjVu: Unknown (2013-11-10)

    SlingPlayer: Unknown (2012-04-22) [Support]

    ContentUploaderPlugin: Unknown (2013-11-10)

    OfficeLiveBrowserPlugin: 12.3.6 (2013-03-13) [Support]

    User Plug-ins internet:

    CitrixOnlineWebDeploymentPlugin: 1.0.105 (2013-04-25) [Support]

    Audio Plug-ins:

    DVCPROHDAudio: Unknown (2013-11-10)

    3rd party preference panes:

    BDSPrefPane (2005-05-17) [Support]

    Flash Player (2016-05-09) [Support]

    Time Machine:

    Skip system files: No.

    Mobile backups: OFF

    Automatic backup: YES

    Volumes to back up:

    Primary HD: disc size: 498,88 GB disc used: 357,95 GB

    Destinations:

    Time Machine [Local] backups

    Total size: 999,86 GB

    Total number of backups: 11

    An older backup: 03/03/13, 21:21

    Last backup: 06/12/15, 19:57

    Backup disk size: too small

    Backup size GB 999,86 < (disc 357,95 GB X 3)

    Top of page process CPU:

    4% coreaudiod

    com.apple.WebKit.WebContent (21) 2%

    com.apple.MediaLibraryService (2) 2%

    kernel_task 2%

    1% boom

    Top of page process of memory:

    736 MB kernel_task

    Com.apple.WebKit.WebContent (21) 664 MB

    Safari of 238 MB

    Mdworker (10) 102 MB

    Com.apple.MediaLibraryService (2) 61 MB

    Virtual memory information:

    70 MB of free RAM

    3.92 GB used RAM (461 MB Cache)

    1.15 Go Swap used

    Diagnostic information:

    3 June 2016, 16:28:52 ~/Library/Logs/DiagnosticReports/findNames_2016-06-03-162852_[redacted].crash

    /System/library/services/AppleSpell.service/Contents/MacOS/findNames

    2 June 2016, 21:27:35 ~/Library/Logs/DiagnosticReports/G2MUpdate_2016-06-02-212735_[redacted].crash

    / Users/USER/Library/Application Support/CitrixOnline / * / G2MUpdate

    Oh, I also have this problem with wake sleep where the computer won't let me open a session and then darkens so I have to reactivate the screen with the power button and it is still frozen and have to do this several times, and after a few minutes, I'm finally able to type something in the connection box.

  • Firefox is very slow and lag for most of the sites I visit, cannot figure out how to fix.

    It started about a month or two it y a. almost all Web sites that I visit Firefox lag or stalls pure and simple script error messages, giving me the advice (not responding) to the top of the page or do not respond.

    I tried all suggestions that I found in help, including "Firefox uses too many resources", "Firefox crashes or does not ', and 'Unresponsive script - how to fix. I deleted the history, cookies and cache, reset Firefox, reinstalled, all what I can. I disabled all my extensions and modules one by one to see that if they touched, I took care of everything, including Firefox is updated. Nothing has changed behavior.

    Here, any help would be appreciated.

    How about a whole new profile?

    SEE: use the Profile Manager to create and delete profiles Firefox

  • Why Firefox does not lag when scrolling through some websites?

    I tested my current profile with all my addons activated and compared it to a whole new addon-free profile. Own profile showed no difference in my current profile; the shift happens on the profile to both clean and current. Disabling scrolling without jolts and hardware acceleration allows nothing. This same site, chrome and Opera both show zero lag, the functions of the site perfectly.
    I use Linux as an operating system, but during startup in Windows FF, the lag is there too. IE scroll normally on this site too.

    Here is a page where the offset of scrolling happens. LAG happens during the major part of sites Yahoo, if I'm not mistaken.

    http://hockey.fantasysports.Yahoo.com/hockey/1954/2

    My hardware is not the issue, because I have this:
    Intel Core i3
    8 GB RAM
    Samsung SSD 840
    NVIDIA 460GTX 768 MB

    You can add this code into the userContent.css file.

    The file userChrome.css (UI) customization and userContent.css (Web sites) are located in the chrome folder in the Firefox profile folder.

    @-moz-document domain(hockey.fantasysports.yahoo.com) {
    html, body { background-attachment: scroll !important; }
    

    If you need it for other web pages to add the fields separated by commas.

    @-moz-document
     domain(hockey.fantasysports.yahoo.com),
     domain(xxx.com) { background-attachment: scroll !important; }
    
  • Lag on iPhone more 6s on iOS 9.3.2

    Hi, I wonder if anyone else has problems with the latest iOS. I had lag occur at random points. For example, I could be using safari or an application and have a significant drop in pace. I intend to do a full backup and restore in the future. I did a full reboot (hold home and lock button) and a hard reboot (hold switch for more than 5 seconds). However, it did not help. I use an iPhone 6 Plus. It is particularly irritating because I did not have problems with iOS 9.3 in the past.

    Do you have another complete reboot (button lock for more than five seconds) and I had not any problems, for about a day, however, it's only happened a couple times and who could be GameCenter. So my solution is to turn off your phone, wait 15 seconds and then hold the power button until the Apple logo appears and continue to hold down the power button until it disappears after 5 seconds. Then, turn on normally.

  • trackpad2 - 3 finger drag, 1 sec lag on release

    When I first turned it on under the trackpad settings or accessibility, there is certainly not a second 1-2 free gal. I used it for days and it perfect. I'm gamer and professional graphic designer I operate a pad/mouse very quickly. all of a sudden, there is a lag of 1-2 dry output which makes the function of 3 fingers unusable for me.

    When I turn to the internet, there is about her being in withdrawal from positions or in its State... any tips/fix for this version mismatch?

    Thank you!

    Wangmander, I don't have a solution to your problem, but I'm very curious to know how you managed to make your magic Trackpad 2 actually drag three fingers! I find that in my new iMac system preferences, and I hate to leave when I got it on my previous Mac. How to set that up? Thank you!

  • Lag when using track changes in the large document

    I do experience lag when using "track changes" in a large .pages document (about 180 pages). I get the wheel of the Rainbow for about 10 seconds after completing each change, which makes it very difficult to obtain concrete results. Other applications on my computer work simultaneously without a hiccup. I use the latest version of the pages on the latest Mac OS. Anyone with a similar problem? Tips to solve this problem?

    It's unfortunate that Apple has not adopted an icon "Achtung Minen!" for the v5 Pages. It is slower than the second coming on intermediate to large documents, and it only gets worse when you add images at higher resolution. Apple has not designed there is a professional-quality, or as a realistic replacement processor for MS Word.

    There is nothing you can do, but seriously, re - evaluate your software solution for processing.

    Here's an icon from the WAD of v5.6.2 request Pages. Prophetic isn't?

  • Mozzilla knows that keeps constant Norton cause FF scroll &amp; video &amp; enter the lag?

    I say that whoever reads this? This constant guard when installing and using your FF, it causes a lag in typing, scrolling, and video. I have and always had Norton, but when I install CG I have this problem of late. I have remove the constant guard and the delay has disappeared. Please SEND THIS thank you.

    Is - this constant guard Xfinity? This works outside Firefox or it is an Add on Firefox?

  • 12 Firefox is very slow to load pages and if two tabs are open, it lag.

    12 Firefox is very slow to load pages and if two tabs are open, it lag. I've tried everything (e.g. virus, Defrag, I created a new profile in "run", etc.). I had my router/line checked everything etc and after 2 weeks of cleaning/testing etc its all pointing to Firefox as the problem. Please help because it's driving crazy me.


Maybe you are looking for

  • Is it possible for me to load a file on one ftp site other than its use fireftp?

    FireFTP is not compatible with the latest version of firefox. I really, really need to upload files to an ftp site. I use it often and it's a big problem that I can't do it now. Is there another way to do it? Another piece of software? Something buil

  • Satellite L505-13N - can't find repair manuals

    Hello everyone My laptop very often stops because of the high temperatures. I want to tear out to remove dust, but I can't find the service manual for this. I would appreciate help! I searched thoroghly with no result. So I'm hanging on you guys! Tha

  • connect to new computer at home

    I buy a new House Pavillion wireless computer and want to connect my HP officejet 6600 printer, fax, scanner... to my ew computer. How?

  • Strange keyboard on Satellite M40 problems

    My Toshiba M40 has been giving me problems keyboard quite frequently. I funny characters like NB¬AWhen I press the left SHIFT key and then the keyboard starts abnormal behavior: 1. He moved to uppercase mode - to type letters more low, I actually hav

  • Core2Duo on old Satellite A100

    Hallo! Toshiba Satellite A100-692 with the most recent BIOS does support the Core2Duo with Socket M Merom processors?