PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Managing the minutes and the hours
  • Operators available for the minutes
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
..Minute is used to:
  • Retrieve minutes from a Time or DateTime variable or the number of minutes from a Duration variable.
  • Modify minutes in a Time or DateTime variable or the number of minutes in a Duration variable.
  • Retrieve the minutes or the number of minutes from a Date item (in "Date and Time" or "Duration" format) or from a Time item.
  • Modify the minutes or the number of minutes in a Date item (in "Date and Time" or "Duration" format) or in a Time item.
Note: ..Minute is used to simplify the operations performed on the times and on the durations (add an hour, etc.).
Reminder: The Date items are used to manage:
  • the simple dates "Year - Month - Day" (YYYYMMDD format)
  • the dates and times "Year - Month - Day - Hours - Minutes - Seconds - Milliseconds" (YYYYMMDDHHMMSSLLL format)
  • the durations "Number of days - Number of hours - Number of minutes - Number of seconds - Number of milliseconds" (+DHHMMSSLLL format)
Versions 16 and later
Universal Windows 10 App This property is now available for the Windows Phone applications.
New in version 16
Universal Windows 10 App This property is now available for the Windows Phone applications.
Universal Windows 10 App This property is now available for the Windows Phone applications.
Versions 17 and later
iPhone/iPad This property is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This property is now available for the iPhone/iPad applications.
iPhone/iPad This property is now available for the 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 21 and later
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.
New in version 21
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.
Apple Watch This property is now available in Apple Watch mode.
Example
StartTime is Time = "1230"
// Add 50 minutes
StartTime..Minute += 50
// StartTime corresponds to 13:20

// Modify the minutes
StartTime..Minute = 10
Work.StartTime = "1230"
// Add 50 minutes
Work.StartTime..Minute += 50
// StartTime corresponds to 13:20

// Modify the minutes
Work.StartTime..Minute = 10
Syntax

Finding out the number of minutes in a Time, DateTime or Duration variable Hide the details

<Result> = <Time>..Minute
<Result>: Integer
Number of minutes on 2 digits.
<Time>: Time, DateTime or Duration
Name of the Time, DateTime or Duration variable to use.

Modifying the number of minutes in a Time, DateTime or Duration variable Hide the details

<Time>..Minute = <New number of minutes>
<Time>: Time, DateTime or Duration
Name of the Time, DateTime or Duration variable to use.
<New number of minutes>: Character string or integer
New number of minutes (included between 0 and 59). Replaces the number of minutes in the specified variable.

Finding out the number of minutes in a Time or Date item (in "Date and Time" or "Duration" format) Hide the details

<Result> = <File name>.<Item name>..Minute
<Result>: Integer
Number of minutes on 2 digits.
<File name>: Character string (with or without quotes)
Name of data file used. This name was defined in the data model editor or by the File description type.
<Item name>: Character string (with or without quotes)
Name of item used. This name was defined in the data model editor or by the Item description type.

Modifying the number of minutes in a Time or Date item (in "Date and Time" or "Duration" format) Hide the details

<File name>.<Item name>..Minute = <New number of minutes>
<File name>: Character string (with or without quotes)
Name of data file used. This name was defined in the data model editor or by the File description type.
<Item name>: Character string (with or without quotes)
Name of item used. This name was defined in the data model editor or by the Item description type.
<New number of minutes>: Character string or integer
New number of minutes (included between 0 and 59). Replaces the number of minutes in the specified item.
Remarks

Managing the minutes and the hours

Case 1: Direct assignment
During a direct assignment (for example, MyTime..Minute = n), the minutes must be included between 00 and 59. A WLanguage error occurs if an invalid number of minutes is specified.
The syntax MyTime..Minute = MyTime..Minute + 5 may generate an error at run time.
Case 2: Operations on the minutes
When performing operations on the Time and DateTime variables, the hours are included between 0 and 23 and the minutes between 0 and 59. The addition or subtraction of minutes automatically takes into account the changes from 59 minutes to the next hour.
Therefore, if 50 minutes are added to:
  • a Time variable corresponding to 23:35, the result will correspond to 0:25.
  • a DateTime variable, the hour and the number of minutes will be modified (an hour will be added).
// Example on a variable
StartTime is Time = "2335"  
StartTime..Minute += 50
// StartTime corresponds to 0:25

StartTime is DateTime = "200411262335"
StartTime..Minute += 50
// StratTime corresponds to 27/11/2004 at 0:25

Operators available for the minutes

The following arithmetic operators can be used by ..Minute:
  • ++ and --
  • += and -=
// Example on an item
Work.StartTime = "1320"
Work.StartTime..Minute++     // Add 1 minute
Work.StartTime..Minute+=5     // Add 5 minutes
Work.StartTime..Minute-=5        // Subtract 5 minutes
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment