PostgresSQL time type

what is the data type for save the time like 2:10pm on postgresql and no like 18:00

to_char([i]columnname[/i], 'HH12:MIPM')

Store the value using the TIME data type, query it using a formatter function, such as above.

Though honestly, I’d just use DATETIME, create a new Date object, and set the SQLDateTime property to the value returned by the database. Then you can use the Date features you’re already familiar with.

hi Thom
can you put i litter example i am a bit lost with the time

Are you by any chance confusing storing with presentation? All date/time are stored the same way (23:00 = 11:00Pm) , but can be presented in different styles. Thom explained how to retrieve the time as you requested formated as string in a query.

SELECT to_char(myTimeColumnInMyTable, ‘HH12:MI PM’) AS myOutputName FROM myTable

http://www.postgresql.org/docs/9.2/static/functions-formatting.html

time to stored

You do not store your time in a custom format. You can query it in a custom format.

ok
thanks