Database Date Types
As databases support different date-related formats, the following table clarifies compatibility with those formats and the SnapLogic expression language methods of toLocaleDateString()/toLocaleDateTimeString()/toLocaleTimeString() in Mapper Snap. In general, only those database types that are outputted as Joda DateTime objects can be used with the toLocale methods. To get string values of the other date types use toString().
Database data type | Output type from Select/Execute | Compatible with toLocaleDateString() / toLocaleDateTimeString() / toLocaleTimeString() |
---|---|---|
AzureSQL | ||
Date | LocalDate | Not Compatible |
DateTime | LocalDateTime | Not Compatible |
Datetime2 | LocalDateTime | Not Compatible |
DateTimeOffset | DateTime | Compatible |
SmallDateTime | LocalDateTime | Not Compatible |
Time | LocalTime | Not Compatible |
Hive | ||
Date | LocalDate | Not Compatible |
Timestamp | DateTime | Not Compatible |
Snowflake | ||
Date | LocalDate | Not Compatible |
Datetime | LocalDateTime | Not Compatible |
Timestamp with Local Time Zone | Timestamp with Time Zone | Not Compatible |
Localdatetime | LocalDateTime | Not Compatible |
Time | Localtime | Not Compatible |
MongoDB | ||
Date | DateTime | Compatible |
Timestamp | String | Not compatible |
Google BigQuery | ||
Date | Datetime | Compatible |
Time | LocalTime | Not Compatible |
DateTime | DateTime | Compatible |
Timestamp | DateTime | Compatible |
SQL Server | ||
Date | LocalDate | Not Compatible |
DateTime | LocalDateTime | Not Compatible |
Datetime2 | LocalDateTime | Not Compatible |
DateTimeOffset | DateTime | Compatible |
SmallDateTime | LocalDateTime | Not Compatible |
Time | LocalTime | Not Compatible |
Oracle | ||
Date | LocalDateTime | Not Compatible |
Timestamp | Not Compatible | Not Compatible |
Timestamp with Time Zone | DateTime | Compatible |
Timestamp with Local Time Zone | LocalDateTime | Not Compatible |
MySQL | ||
Date | LocalDate | Not Compatible |
Time | LocalTime | Not Compatible |
DateTime | LocalDateTime | Not Compatible |
Timestamp | DateTime | Compatible |
Redshift | ||
Timestamp | LocalDateTime | Not Compatible |
Date | LocalDate | Not Compatible |
Time | LocalTime | Not Compatible |
PostgreSQL | ||
Timestamp | LocalDateTime | Not Compatible |
Timestamp with Time Zone | DateTime | Compatible |
Time | LocalTime | Not Compatible |
Time with Time Zone | String | Not Compatible |
Date | LocalDate | Not Compatible |
SAP HANA | ||
Date | LocalDate | Not Compatible |
Timestamp | Datetime | Compatible |
Time | LocalTime | Not Compatible |
Cassandra | ||
Date | DateTime | Compatible |
Vertica | ||
TimeStamp | LocalDateTime | Not Compatible |
Timestamp with Time Zone | LocalDateTime | Not Compatible |
Time with Time Zone | LocalDateTime | Not Compatible |
Date | LocalDate | Not Compatible |
Time | LocalTime | Not Compatible |
Have feedback? Email documentation@snaplogic.com | Ask a question in the SnapLogic Community
© 2017-2024 SnapLogic, Inc.