Previous Document Next Document

Object Model Reference : Classes : C : CorelScriptTools : Methods : CorelScriptTools.GetTimeInfo


CorelScriptTools.GetTimeInfo

Sub GetTimeInfo(Time As Date, Hour As Long, Minute As Long, Second As Long)

Description

Member of CorelScriptTools

The GetTimeInfo method extracts the components of a time expression to numeric variables.

Parameter
Description
Time
Specifies the time expression to extract components from
Hour
Specifies the numeric variable that is assigned the hour component from the specified time expression. The number assigned is based on a 24-hour clock. For example, 16 is the numeric variable for 4pm.
Minute
Specifies the numeric variable that is assigned the minute component from the specified time expression
Second
Specifies the numeric variable that is assigned the second component from the specified time expression

Example

In the following code example, the first line declares the date variable TodayTime. This variable is then assigned the current date and time with the GetCurrDate function. The variables H, M, and S are then assigned their respective component of the time stored in TodayTime. If TodayTime is set to 5:37:16 PM, then H equals 17, M equals 37, and S equals 16.

DIM TodayTime AS DATE
TodayTime = GETCURRDATE()
GETTIMEINFO TodayTime, H&, M&, S&

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.