This content has been translated automatically. Click here to view the French version.
WINDEV
WEBDEV
WINDEV Mobile
Others
InDays (Property)
In french: EnJours
InDays is used to convert a Duration variable into days. You can:
• Find out the number of days corresponding to a duration.
• Modify the number of days corresponding to a duration.
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 days corresponding to a Duration variable

<Result> = <Duration used>.InDays
<Result>: Digital
Number of days corresponding to the specified duration.
<Duration used>: Duration
Name of Duration variable to use.

Modifying the number of days corresponding to a Duration variable

<Duration used>.InDays = <New duration>
<Duration used>: Duration
Name of the Duration variable to use.
<New duration>: Real
Number of days corresponding to the specified duration.
Related Examples:
 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