PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
..InHours is used to convert a Duration variable into hours. You can:
  • Find out the number of hours corresponding to a duration.
  • Modify the number of hours corresponding to a duration.
Versions 16 and later
Universal Windows 10 App This property is now available for Windows Phone applications.
New in version 16
Universal Windows 10 App This property is now available for Windows Phone applications.
Universal Windows 10 App This property is now available for Windows Phone applications.
Versions 17 and later
iPhone/iPad This property is now available for iPhone/iPad applications.
New in version 17
iPhone/iPad This property is now available for iPhone/iPad applications.
iPhone/iPad This property is now available for iPhone/iPad applications.
Versions 18 and later
Universal Windows 10 App This property is now available in Windows Store apps mode.
New in version 18
Universal Windows 10 App This property is now available in Windows Store apps mode.
Universal Windows 10 App This property is now available in Windows Store apps mode.
Versions 20 and later
WEBDEV - Browser code This property is now available in browser code.
New in version 20
WEBDEV - Browser code This property is now available in browser code.
WEBDEV - Browser code This property is now available in browser code.
Versions 21 and later
Apple Watch This property is now available in Apple Watch mode.
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
New in version 21
Apple Watch This property is now available in Apple Watch mode.
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Apple Watch This property is now available in Apple Watch mode.
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Example
StartDate is DateTime
EndDate is DateTime
MyDuration is Duration

StartDate = "200812251535"
EndDate = "200812271812"
MyDuration = EndDate - StartDate
Trace(MyDuration..InDays)   // 2.109027777778
Trace(MyDuration..InHours)  // 50.61666666667
Trace(MyDuration..InMinutes) // 3037
MyDuration is Duration
MyDuration..InDays = 1.5
Trace(MyDuration..InHours)  // 36
Trace(MyDuration..InMinutes) // 2160
Syntax

Finding out the number of hours corresponding to a Duration variable Hide the details

<Result> = <Duration used>..InHours
<Result>: Real
Number of hours corresponding to the specified duration.
Remark: Before version 19, this parameter was a real.
<Duration used>: Duration
Name of Duration variable to use.

Modifying the number of hours corresponding to a Duration variable Hide the details

<Duration used>..InHours = <New duration>
<Duration used>: Duration
Name of Duration variable to use.
<New duration>: Real
Number of hours corresponding to the specified duration.
Remark: Before version 19, this parameter was a real.
Related Examples:
Calculations on durations Unit examples (WINDEV): Calculations on durations
[ + ] Calculations on dates and times with the WLanguage functions:
- Calculate the duration between two moments (dates and times)
- Calculate a sum of durations
- Calculate an average of durations
Minimum version required
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment