Get Date and Time in Binary
Verb: binaryReadDateTime
Available from: <Standard>
Gets the date and time from within a binary file.
The command considers all file types as binary (.txt, .html, .pdf etc.).
Syntax
binaryReadDateTime --file(BinaryFileReader) (DateTime)=value
Inputs
Script | Designer | Required | AcceptedTypes | Description |
---|---|---|---|---|
--file | Binary file | Required | Binary File Reader | Binary file used for reading. |
Outputs
Script | Designer | AcceptedTypes | Description |
---|---|---|---|
value | Date time | Date Time | Date and time taken from file. |
Example
Gets the date and time that are saved in binary within a text file.
defVar --name binaryReader --type BinaryFileReader
defVar --name dateTime --type DateTime
// Open the file informed for reading.
// Download the following file to execute the command.
openBinaryReader --share "Read" --path "binaryDate.txt" --encoding "Default" binaryReader=value
// Get the date and time contained in the text file.
binaryReadDateTime --file ${binaryReader} dateTime=value
logMessage --message "${dateTime}" --type "Info"
// Returns the date and time value.
For the correct operation of the script above, it is necessary to download the file and enter its path in the "Path" parameter of the "Open Binary File to Read" command.
Remarks
For the Get Date and Time in Binary command to work correctly, there must be a file with a date and time value saved in binary.
The Binary file parameter uses the variable that is generated by the Open Binary File for Reading command, which holds the file containing the binary value.