Open topic with navigation

TIBCO ActiveSpaces® - Enterprise Edition 5.0.0

# Querying tibDateTime Columns

To perform a SQL query on a tibDateTime column, the value of the tibDateTime column is internally converted to a string of the form:

    YYYY-MM-DD HH:MM:SS.SSSSSSSSSZ

Where the ' SSSSSSSSS ' following ' SS. ' represent nanoseconds and 'Z' represents Coordinated Universal Time (UTC).

ActiveSpaces internally converts tibDateTime column values to strings in this format. As a result, the SQL date and time functions, which normally only work on ISO 8601 formatted strings, can also be used on the converted tibDateTime values. The date and time functions are lenient with respect to the number of digits following the decimal in the fractional seconds, so the nine places of precision in the string representation of a tibDateTime value does not cause any issues.

The following are examples of queries, which can be run on a column of type `datetime` that contains a tibDateTime object:

    SELECT * FROM mytable WHERE dtm='2016-01-01 00:00:00.000000000Z'
    SELECT * FROM mytable WHERE date(dtm)='2016-01-01'
    SELECT * FROM mytable WHERE datetime(dtm)='2016-01-01 00:00:00'

For more information about using the SQL SELECT statement to query `tibDateTime` columns, see tibDateTime.

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO ActiveSpaces® - Enterprise Edition

Copyright © 2009-2025. Cloud Software Group, Inc. All Rights Reserved.