Date

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
(Example 1)
 
(2 intermediate revisions by one user not shown)
Line 1: Line 1:
$Date is a [[System Functions|System Function]].
+
$Date is a [[Time Functions|Time 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  
 
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  
Line 13: Line 13:
  
  
[[File:date.png]]
+
[[File:date43.jpg]]
 
+
 
+
 
+
  
 
== Example 2 ==
 
== Example 2 ==
Line 31: Line 28:
  
 
The script above will set only the time from the time and date sequence to the variable #two.
 
The script above will set only the time from the time and date sequence to the variable #two.
 +
 +
The resulting time will be:
 +
 +
<pre>
 +
22:20:43
 +
</pre>

Latest revision as of 22:47, 28 December 2016

$Date is a Time 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.

[edit] 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.


Date43.jpg

[edit] 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.

The resulting time will be:

22:20:43
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox