Caravan Business Server>Help>Objects>Time>
Properties
Second
|
Name
|
Second
|
Text
|
It is used to set or read the seconds.
|
Syntax
|
Time x x(second)
|
Sample
|
<caravan> Time t t(second)="0" t(second t(second)+="60";// advance time by 1 minute </caravan>
|
|
Caravan Business Server>Help>Objects>Time>
Properties>
Time
|
Name
|
Time
|
Text
|
Used to set or read the time
|
Syntax
|
Time x x(time)
|
Sample
|
Time x file f="c"\xyz\new.txt" x(time)=f(time) ; // assign the file creation time to the time object
|
|
Caravan Business Server>Help>Objects>Time>
Properties>
Year
|
Name
|
Year
|
Text
|
It is used to set or read the Year. The ReadOnly property of year is yy
|
Syntax
|
Time x x(year) x(yy)
|
Sample
|
<caravan> time Current Current(year) ;//display current year Current(year)="2004" // assign a new value Current (year) ;//displays the current year e.g 2004 Current(yy) ;// displays the current year in format yy e.g 04
//We can also add or subtract year by a particular amount by directly adding/subtracting the number to it Current(year)+= "5" ; //Advances year by 5. Which gives 2009 //Or Current(year)-= 5 ; //Deducts year by 5. Which gives 1999 </caravan>
|
|
Caravan Business Server>Help>Objects>Time>
Properties>
Month
|
Name
|
Month
|
Text
|
It is used to set or read the Month. The ReadOnly property of month is mm.
|
Syntax
|
Time x x(month) x(mm)
|
Sample
|
<caravan> time Current Current(month) ;//display current month Current(month)="4" // assign a new value //We can also add or subtract month by a particular amount by directly adding/subtracting the number to it Current(month)+= "1" ; //Advances month by 1. Which gives 5 Current(month)+= "10" ;//advances month by 10. Automatically goes to the next year. //Or Current(month)-= "15" ; //Deducts month by 15. Will automatically change the year. Current(month) = "Feb" ;//assign Feb as the current month Current(month) = "February" ;//another way to assign the current month </caravan>
|
|
Caravan Business Server>Help>Objects>Time>
Properties>
Day
|
Name
|
Day
|
Text
|
It is used to set or read the day.
|
Syntax
|
Time x x(day)
|
Sample
|
<caravan> time Current current(day) = "Monday" ; //set the day to monday //or current(day) ;//display current day e.g Sunday, monday tuesday etc </caravan>
|
|
Caravan Business Server>Help>Objects>Time>
Properties>
Date
|
Name
|
Date
|
Text
|
It is used to set or the date. The ReadOnly property of date is dd.
|
Syntax
|
Time x x(date)
|
Sample
|
<caravan> time current Current(date) ;//display current date Current(date)="4" // assign a new value //We can also add or subtract date by a particular amount by directly adding/subtracting the number to it Current(date)+= "1" ; //Advances date by 1. Current(date)+= "27" ;//will automatically set the next month and will take the new date. //Or Current(date)-= "1" ; //Deducts date by 1. </caravan>
|
|
Caravan Business Server>Help>Objects>Time>
Properties>
Hour
|
Name
|
Hour
|
Text
|
It is used to set or read the hour.
|
Syntax
|
Time x x(hour)
|
Sample
|
<caravan> Time t t(hour)="0" t(hour)+="24";// advance time by one day
|
|
Caravan Business Server>Help>Objects>Time>
Properties>
Minute
|
Name
|
Minute
|
Text
|
It is used to set or read the minute.
|
Syntax
|
Time x x(minute)
|
Sample
|
<caravan> Time t t(minute)="0" t(minute)+="60";// advance time by one hour </caravan>
|
|
Home
Back
|