TimeToString (Function) In french: HeureVersChaîne
// Convert the specified time according to the "HH:MM:SS:CC" format TimeToString("12005956") // Returns "12:00:59:56" Left(TimeToString("12005956"), 5) // Returns "12:00"
Syntax
<Result> = TimeToString(<Time to convert> [, <Format>])
<Result>: Character string Character string in the specified format. <Time to convert>: Character string (with quotes), Time or DateTime variable Time to use. This time can correspond to: - a character string in HHMMSSCC format (HH corresponds to hours, MM to minutes, SS to seconds and CC to hundredths of a second).
Versions 24 and latera character string in YYYYMMDDHHmmSSCC format (YYYY corresponds to the year, MM to the month, DD to the day, HH to hours, mm to minutes, SS to seconds and CC to hundredths of a second). In this case, only the time is taken into account. New in version 24a character string in YYYYMMDDHHmmSSCC format (YYYY corresponds to the year, MM to the month, DD to the day, HH to hours, mm to minutes, SS to seconds and CC to hundredths of a second). In this case, only the time is taken into account. a character string in YYYYMMDDHHmmSSCC format (YYYY corresponds to the year, MM to the month, DD to the day, HH to hours, mm to minutes, SS to seconds and CC to hundredths of a second). In this case, only the time is taken into account. - a Time variable.
Versions 24 and latera DateTime variable. In this case, only the time is taken into account. New in version 24a DateTime variable. In this case, only the time is taken into account. a DateTime variable. In this case, only the time is taken into account.
<Format>: Optional character string (with quotes) Format that must be applied to the time. This parameter corresponds to: - a character string (a sentence for example). The specific characters representing the different elements of the time (HH, MM, SS, CC or AP) will be automatically replaced by their value identified in the <Time> string. In this string:
- HH represents the number of hours,
- MM represents the number of minutes,
- SS represents the number of seconds,
- CC represents the number of hundredths of a second,
- AP represents "AM" or "PM" (if "AP" is used, the time is displayed in 12-hour format).
- the maskSystemTime constant. This constant allows you to directly use the mask used by the system time.
  This constant is not available.
If this parameter is not specified, the result is in HH:MM:SS:CC format.
Remarks Time validity The time validity passed as parameter is checked. A message is displayed if the time is invalid. You can check the validity of a time using TimeValid. Tip: To have a valid time in a string, the time must be entered in a Time Edit control. Time format TimeToString is used to format a time returned by IntegerToTime or TimeSys. The result can be assigned to a text control, for example. Business / UI classification : Neutral code
This page is also available for…
|
|
|
| |
| | https://youtu.be/qzkqFp0OzkI
https://windevdesenvolvimento.blogspot.com/2019/05/dicas-2102-windev-webdev-mobile-data-28.html
// BTN_FORMATAR_HORA
STC_MOSTRA_HORA_FORMATADO=TimeToString(Now(),"A Hora é HH MM")
|
|
|
|
| |
| |
| |
| |
| |
| |
| | |
|