Object Model Reference : Classes : C : CorelScriptTools : Methods : CorelScriptTools.GetDateInfo |
Sub GetDateInfo(Date As Date, Year As Long, Month As Long, Day As Long, DayOfWeek As Long)
Member of CorelScriptTools
The GetDateInfo method extracts the components of a date expression to numeric variables.
In the following code example, the first line declares the date variable TodayDate. This variable is then assigned the current date with the GetCurrDate function. The variables Y, M, D, and DW are then assigned their respective component of the date stored in TodayDate. If TodayDate is set to March 12, 2005, then Y equals 2005, M equals 3, D equals 12, and DW equals 7.
DIM TodayDate AS DATE |
TodayDate = GETCURRDATE() |
GETDATEINFO TodayDate, Y&, M&, D&, DW& |
Copyright 2013 Corel Corporation. All rights reserved.