Database Date Types

Describes how database date formats map to SnapLogic output types and their compatibility with toLocale* expression methods in the Mapper Snap.

Only database types that are output as Joda DateTime objects can be used with the toLocale* methods. To get string values of other date types, use toString().

Note: The Output type from Select/Execute column reflects the Java/Joda type returned by the database Snap (for example, Database Select or Database Execute) when reading a column of that database data type.

AzureSQL

Database data type Output type from Select/Execute Compatible with toLocaleDateString() / toLocaleDateTimeString() / toLocaleTimeString()
Date LocalDate Not compatible
DateTime LocalDateTime Not compatible
Datetime2 LocalDateTime Not compatible
DateTimeOffset DateTime Compatible
SmallDateTime LocalDateTime Not compatible
Time LocalTime Not compatible

Hive

Database data type Output type from Select/Execute Compatible with toLocaleDateString() / toLocaleDateTimeString() / toLocaleTimeString()
Date LocalDate Not compatible
Timestamp DateTime Not compatible

Snowflake

Database data type Output type from Select/Execute Compatible with toLocaleDateString() / toLocaleDateTimeString() / toLocaleTimeString()
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

Database data type Output type from Select/Execute Compatible with toLocaleDateString() / toLocaleDateTimeString() / toLocaleTimeString()
Date DateTime Compatible
Timestamp String Not compatible

Google BigQuery

Database data type Output type from Select/Execute Compatible with toLocaleDateString() / toLocaleDateTimeString() / toLocaleTimeString()
Date DateTime Compatible
Time LocalTime Not compatible
DateTime DateTime Compatible
Timestamp DateTime Compatible

SQL Server

Database data type Output type from Select/Execute Compatible with toLocaleDateString() / toLocaleDateTimeString() / toLocaleTimeString()
Date LocalDate Not compatible
DateTime LocalDateTime Not compatible
Datetime2 LocalDateTime Not compatible
DateTimeOffset DateTime Compatible
SmallDateTime LocalDateTime Not compatible
Time LocalTime Not compatible

Oracle

Database data type Output type from Select/Execute Compatible with toLocaleDateString() / toLocaleDateTimeString() / toLocaleTimeString()
Date LocalDateTime Not compatible
Timestamp Not compatible Not compatible
Timestamp with Time Zone DateTime Compatible
Timestamp with Local Time Zone LocalDateTime Not compatible

MySQL

Database data type Output type from Select/Execute Compatible with toLocaleDateString() / toLocaleDateTimeString() / toLocaleTimeString()
Date LocalDate Not compatible
Time LocalTime Not compatible
DateTime LocalDateTime Not compatible
Timestamp DateTime Compatible

Redshift

Database data type Output type from Select/Execute Compatible with toLocaleDateString() / toLocaleDateTimeString() / toLocaleTimeString()
Timestamp LocalDateTime Not compatible
Date LocalDate Not compatible
Time LocalTime Not compatible

PostgreSQL

Database data type Output type from Select/Execute Compatible with toLocaleDateString() / toLocaleDateTimeString() / toLocaleTimeString()
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

Database data type Output type from Select/Execute Compatible with toLocaleDateString() / toLocaleDateTimeString() / toLocaleTimeString()
Date LocalDate Not compatible
Timestamp DateTime Compatible
Time LocalTime Not compatible

Cassandra

Database data type Output type from Select/Execute Compatible with toLocaleDateString() / toLocaleDateTimeString() / toLocaleTimeString()
Date DateTime Compatible

Vertica

Database data type Output type from Select/Execute Compatible with toLocaleDateString() / toLocaleDateTimeString() / toLocaleTimeString()
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