Write Date Time in Binary File
Verb: binaryWriteDateTime
Available from: <Standard>
Writes a "Date Time" value to a binary file.
The command considers all types of files (.txt, .html, .pdf etc.) as binary files.
Syntax
binaryWriteDateTime --value(DateTime) --file(BinaryFileWriter)
Inputs
Script | Designer | Required | AcceptedTypes | Description |
---|---|---|---|---|
--value | Date Time | Required | Date Time | "Date Time" value converted to binary in the file. |
--file | Binary file | Required | Binary File Writer | Binary file that holds the data. |
Example
The command writes a "Date Time" value to a binary file, and also uses the Open Binary File for Writing to create this file.
defVar --name filePath --type String
defVar --name binaryWriter --type BinaryFileWriter
defVar --name dateTime --type DateTime
getCurrentDateAndTime --localorutc "LocalTime" dateTime=value
getSpecialFolder --folder "Desktop" filePath=value
openBinaryWriter --mode "OpenOrCreate" --autoflush --share "Write" --path "${filePath}\\binary.txt" --encoding "Default" binaryWriter=value
binaryWriteDateTime --value "${dateTime}" --file ${binaryWriter}
binaryFileClose --file ${binaryWriter}