Created
July 25, 2023 02:28
-
-
Save vnext-nguyen-quyen/00dcebebfc0feda095eedba9dedaf1a0 to your computer and use it in GitHub Desktop.
PosgreSQL note statement
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Convert timestamp to microsecond bigint: | |
SELECT EXTRACT(EPOCH FROM to_timestamp('20210311 09','yyyymmdd TZH'))::bigint | |
2. Covnert string to timestampt with timemodified timezone +9: | |
to_timestamp(timemodified) >= to_timestamp(''20210309000000 09'',''yyyymmddhh24miss TZH'') | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment