PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
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
Transforms a duration in character string format into a duration that can be used by a Duration variable.
Note: This function is mainly used to assign the result of DateTimeDifference into a Duration variable.
Versions 16 and later
Android This function is now available for the Android applications.
Universal Windows 10 App This function is now available for the Windows Phone applications.
New in version 16
Android This function is now available for the Android applications.
Universal Windows 10 App This function is now available for the Windows Phone applications.
Android This function is now available for the Android applications.
Universal Windows 10 App This function is now available for the Windows Phone applications.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 20 and later
WEBDEV - Browser code This function is now available in browser code.
New in version 20
WEBDEV - Browser code This function is now available in browser code.
WEBDEV - Browser code This function is now available in browser code.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
// To fill a duration from the result of DateTimeDifference
sDiff is string
sDiff = DateTimeDifference(sStart, sEnd)
// Convert the difference into a duration variable
dDuration is Duration
dDuration = StringToDuration(sDiff, durationCenti)
Syntax
<Result> = StringToDuration(<String> , <Format>)
<Result>: Duration variable
Duration in a format recognized by the Duration variables.
<String>: Character string
Duration in the format specified in <Format>.
<Format>: Character string
Format of the duration to convert. This format corresponds to:
  • a character string (a sentence for example). The specific characters representing the different elements of the duration (D, HH, MM, SS or LLL) will be automatically replaced by their value identified in the <Duration> string. In this string, the characters:
    • D represents the number of days,
    • HH represent the number of hours,
    • MM represent the number of minutes,
    • SS represent the number of seconds,
    • LLL represent the number of milliseconds.
  • one of the following constants:
    durationMilliFormat used: "+DHHMMSSLLL"
    durationCentiFormat used: "+DHHMMSSLL": used to create a duration from the format of the result of DateTimeDifference
Remarks
The direct assignment <Duration> = <String> is equivalent to StringToDuration used with the "+DHHMMSSLLL" format.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230std.dll
Windows Mobile wp230std.dll
WEBDEV - Browser code WDJS.DLL
Java wd230java.jar
Linux wd230std.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment