Click here to Skip to main content
15,888,590 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
Hi, everyone. I am working on a mvc c# project, and we started to use postgre sql instead sql. One of the sql queries I had to translate from sql to postgre sql has a column with type "time(7)". The record is like this: "09:00:00.0000000". What is postgresql type for this type "time" in sql?

What I have tried:

I tried to look in some documentation but did not find anything appropriate.
Posted
Updated 17-Apr-19 4:32am

In PostgreSQL, Time(p) is a Time type with a precision of p, where precision is a positive number
Precision levels of 0-6 will have the Time stored as an Integer
Levels 7 and above will store the Time as a floating point.

Is (MS) SQL Server, the type would be the same Time(p), however; the range is limited from 0-7

PostgreSQL: Documentation: 9.1: Date/Time Types[^]
time (Transact-SQL) - SQL Server | Microsoft Docs[^]
 
Share this answer
 
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900