Datetime
Hello guys, i'm new to neon. i try to build a local app with neon as the DB. i entry some data to a datagrid. when i data instert i keep track of it on my DB as Insert_date with DATE datatype. but i actually want to have the exact time not just the day it is inserted. can someone help me?
18 Replies
metropolitan-bronze•6mo ago
Hi! In postgres, the TIMESTAMP_TZ is the recommended data type for keeping track of the time
modern-teal•6mo ago
thanks for the reply.
modern-teal•6mo ago
i cant see it here

modern-teal•6mo ago
should i write a query to create it?
metropolitan-bronze•6mo ago
"Timestamp with time zone" is the long name for timestamp_tz
modern-teal•6mo ago
oh i now get it
modern-teal•6mo ago
i changed to it , created a new entry and i still get this. the time isnt right it like 12:00 not 3:00

modern-teal•6mo ago
in my code is use this
metropolitan-bronze•6mo ago
What language/framework are you using?
modern-teal•6mo ago
C# building a WinForms App
metropolitan-bronze•6mo ago
:1010: ok let me search some docs
modern-teal•6mo ago
ok mate. thanks in advance :chefskiss:
metropolitan-bronze•6mo ago
Are you also using the Npgsql library?
modern-teal•6mo ago
yeap, you are right
i can provice you some code too, if it could help
like how i insert the data in the database
metropolitan-bronze•6mo ago
Yes please
modern-teal•6mo ago
oh brother. i just found my mistake
but thanks for telling me to use timestamp_tz
metropolitan-bronze•6mo ago
Happy to help 🙂
modern-teal•6mo ago
all good , have a nice day. thanks a lot
:1010: :chefskiss: