Skip to content

Commit 292e034

Browse files
committed
new: add 2 new postgres TIL
1 parent efdf80e commit 292e034

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ To read more of my writing about programming and technology, [check out my blog]
105105
<!-- * [](postgresql/#.md) -->
106106
* [How to Check Inequality](postgresql/check-inequality.md)
107107
* [How to Generate a Random UUID](postgresql/generate-uuid.md)
108+
* [How to Generate a Current Timestamp With TimeZone](postgresql/generate-current-timestamp-with-timezone.md)
109+
* [How to Generate a Current Timestamp Without TimeZone](postgresql/generate-current-timestamp-without-timezone.md)
108110
* [Count How Many Records Are In Each Category](postgresql/count-how-many-records-in-each-category.md)
109111

110112
### Python
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# How To Generate a Current Timestamp With TimeZone
2+
3+
---
4+
5+
In PostgreSQL you may find that you need a current timestamp with timezone for some reason, maybe an example or a test. You can generate a current timestamp with timezone by using this command:
6+
7+
```sql
8+
select current_timestamp;
9+
10+
11+
```
12+
13+
<!-- [link]() -->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# How To Generate a Current Timestamp Without TimeZone
2+
3+
---
4+
5+
In PostgreSQL you may find that you need a current timestamp without timezone for some reason, maybe an example or a test. You can generate a current timestamp without timezone by using this command:
6+
7+
```sql
8+
select now()::timestamp;
9+
10+
11+
```
12+
13+
<!-- [link]() -->

0 commit comments

Comments
 (0)