Date

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
Line 20: Line 20:
 
== Example 2 ==
 
== 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.
+
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.
  
  

Revision as of 20:20, 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.


File:Date.png



Example 2

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.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox