Table of Contents

Search

  1. Preface
  2. Scripting Overview
  3. Tcl Scripting
  4. SQL Scripting

Data Manipulation Commands

Data Manipulation Commands

::dbs::datetime_comp <
datetime_or _timestamp_object1
> <
comparison_operator
> <
datetime_or_timestamp_object 2
>
Performs a comparison of two datetime or timestamp objects. Returns a Boolean true or false object. The
comparison operator
can be one of the following operators:
  • >
  • <
  • <=
  • >=
  • ==
The following example command compares two date objects, and if they are not equal, writes the string "$date1 and $date2 are not equal!" to the console:
if {[ ::dbs::datetime_comp $date1!= $date2 ]}{ puts "$date1 and $date2 are not equal!" }
::dbs::datetime_extract <
option
> <
datetime_or_timestamp_object
>
Extracts date or time elements from a datetime or timestamp object as integers. Valid
option
values are:
  • -y. Extracts the year.
  • -mo. Extracts the month.
  • -d. Extracts the day.
  • -h. Extracts hours.
  • -m. Extracts minutes.
  • -s. Extracts seconds.
  • -ms. Extracts milliseconds.
  • -ns. Extracts nanoseconds.

0 COMMENTS

We’d like to hear from you!