DateSys (Function) In french: DateSys Returns or modifies the system date (current date defined on the current computer). Remarks: The system date corresponds to the current date defined on the server. - This function is equivalent to Today.
Res = DateSys() // Res = "20011225" Res = DateToString(DateSys()) // Res = "25/12/2001" Year = Left(DateSys(), 4) // Year returns the current year (2001 for example)
Syntax <Result>: Character string or Date variable System date in YYYYMMDD format (YYYY corresponds to the year, MM to the month and DD to the day).
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
|
Business / UI classification : Neutral code
This page is also available for…
|
|
|
| |
| | // Exemplo datesys
EDT_Data_Hoje = DateSys()
// Blog com Video e Exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/11/aula-980-windev-datas-15-datesys.html
https://www.youtube.com/watch?v=n1pI_RtNhgY
|
|
|
|
| |
| |
| |
|
| Exemplo Data - Date Para Texto |
|
| d_data_hoje is Date=DateSys() t_hora_hoje is Time=TimeSys() s_dhEvento is string=NumToString(d_data_hoje..Year,"04d")+"-" s_dhEvento+=NumToString(d_data_hoje..Month,"02d")+"-" s_dhEvento+=NumToString(d_data_hoje..Day,"02d")+"T" s_dhEvento+=NumToString(t_hora_hoje..Hour,"02d")+":" s_dhEvento+=NumToString(t_hora_hoje..Minute,"02d")+":" s_dhEvento+=NumToString(t_hora_hoje..Second,"02d")+"-" IF empresa_parametro.horario_verao=True THEN s_dhEvento+="02:00" ELSE s_dhEvento+="03:00" END // 2016-02-09T20:22:27-02:00 //Blog Com Video Exemplo http://windevdesenvolvimento.blogspot.com.br/2016/02/curso-windev-datas-004-transformar-data.html |
|
|
|
| |
| |
| |
|
| WinDev for a Windows application: beware of user privileges! |
|
| When trying to set the computer's clock to a certain date / time, the functions DateSys("20151231") or TimeSys("18:00:00") will not return an error code if the computer's clock is not set (mostly because of missing admin rights). If you wish to be able to act on a returned error then use the API SetSystemTime. |
|
|
|
| |
| |
| |
| |
| |
| |
| | |
|