PC SOFT

AYUDA EN LÍNEA
DE WINDEV, WEBDEV Y WINDEV MOBILE


WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Otros
Procedimientos almacenados
DateSys (Function)
 
Returns or modifies the system date (date of the day defined on the current computer).
Notes:
  • WEBDEV - Código Servidor The system date corresponds to the date of the day defined on the server.
  • This function is equivalent to Today.
Versiones 15 y posteriores
Android This function is now available for the Android applications.
Nueva funcionalidad versión 15
Android This function is now available for the Android applications.
Android This function is now available for the Android applications.
Versiones 16 y posteriores
Universal Windows 10 App This function is now available for the Windows Phone applications.
Nueva funcionalidad versión 16
Universal Windows 10 App This function is now available for the Windows Phone applications.
Universal Windows 10 App This function is now available for the Windows Phone applications.
Versiones 17 y posteriores
iPhone/iPad This function is now available for the iPhone/iPad applications.
Nueva funcionalidad versión 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.
Versiones 18 y posteriores
Widget Android This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Nueva funcionalidad versión 18
Widget Android This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Widget Android This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versiones 21 y posteriores
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Nueva funcionalidad versión 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.
Ejemplo
Res = DateSys()   // Res = "20011225"
Res = DateToString(DateSys()) // Res = "25/12/2001"
Year = Left(DateSys(), 4)
// Year returns the current year (2001 for example)
WINDEVWEBDEV - Código ServidorReportes y ConsultasWindowsWindows MobileAjaxCódigo de Usuario (UMC)Procedimientos almacenados
// Changes the system date and displays the new date
DateSys("20020101")
Info(DateSys())
WINDEVWEBDEV - Código ServidorReportes y ConsultasWindowsLinuxAndroidWidget Android Windows MobileUniversal Windows 10 AppJavaPHPAjaxCódigo de Usuario (UMC)Procedimientos almacenados
TodaysDate is Date = DateSys()
EDT_Date = DateToDayInAlpha(TodaysDate) + " " + TodaysDate..Day + ...
" " + DateToMonthInAlpha(TodaysDate) + " at " + ...
TimeToString(TimeSys(), "HH:MM:SS")
// The EDT_Date control contains for example: Monday 13 August at 14:44:17
Sintaxis

Finding out the system date Ocultar los detalles

<Result> = DateSys()
<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).
WINDEVWEBDEV - Código ServidorReportes y ConsultasWindowsWindows MobileAjaxCódigo de Usuario (UMC)

Modifying the system date Ocultar los detalles

DateSys(<New Date>)
<New Date>: Character string or Date variable
New system date in YYYYMMDD format (YYYY corresponds to the year, MM to the month and DD to the day).
Observaciones
  • To get the date in a format other than YYYYMMDD, you must format the string (with DateToString, Right, Left) or use the properties on the dates. The YYYYMMDD format was chosen because it allows you to check the chronology between two dates, while this would not be possible with a date in YYYYDDMM format or in YYMMDD format for example.
  • On all the current systems, the year of the system date can be included between 1980 and 2099.
  • Caution: To modify the system date, you must have the administrator rights on the current computer.
  • WEBDEV - Código NavegadorLinuxAndroidWidget Android iPhone/iPadUniversal Windows 10 AppJavaPHP In this version, DateSys can only be used to return the system date (today's date defined for the current computer or on the browser computer).
  • AndroidWidget Android iPhone/iPadWindows Mobile In simulation mode, the date of the PC is used. At run time, the date of the mobile device is used.
Componente : wd240std.dll
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Exemplo Datesys
// 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

De matos
04 12 2016
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
De matos AMARILDO
11 02 2016
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.
Jimbo
21 05 2015