Date
From UBot Studio
(Difference between revisions)
(→Example) |
|||
Line 4: | Line 4: | ||
is running on. | is running on. | ||
− | == Example == | + | == Example 1 == |
<pre> | <pre> | ||
Line 14: | Line 14: | ||
[[File:date.png]] | [[File:date.png]] | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | == Example 2 == | ||
+ | |||
+ | If you ever need to grab only the time from the resulting system time and date, simply use the [[$substring]] function to retrieve the information needed, as seen below. | ||
+ | |||
+ | |||
+ | <pre> | ||
+ | set(#one, $date, "Global") | ||
+ | set(#two, $substring(#one, 11, 8), "Global") | ||
+ | |||
+ | </pre> | ||
+ | |||
+ | |||
+ | The script above will set only the time from the time and date sequence to the variable #two. |
Revision as of 20:19, 13 June 2014
$Date is a System Function.
The function returns the current system date and time. This function will provide whatever the date and time is on the system the bot or script is running on.
Example 1
type text(<username field>, $date, "Standard")
Running the script fills the designated field in the type text function with the date and time on the current system.
Example 2
If you ever need to grab only the time from the resulting system time and date, simply use the $substring function to retrieve the information needed, as seen below.
set(#one, $date, "Global") set(#two, $substring(#one, 11, 8), "Global")
The script above will set only the time from the time and date sequence to the variable #two.