user1462378
user1462378

Reputation: 11

How can I have a database table with only one time for each day?

Hi I am developing a Taxreturn Program in Java language and is my first time I am developing a program with database. I have three Forms which means I need three tables in my database where I am going to store information of each form. My first Form is for customers the second is for bookings and the third is for tax records I have successful make the customer form work with the database but i got stuck in the booking form as i need the correct syntax. in my booking table i need to store the date, time as Is logical I have to have only one booking time for each day how can i do that. I will appreciate any help thanks

Upvotes: 1

Views: 74

Answers (1)

It depends on the type of the field.

If field is Date, some implementations assume the time is 00:00:00 ... Many of them simply store the exact timestamp, but truncate and give you the value, as required.

Best way to do it is when inserting, manually specify the exact time yourself. This is the most cross-database way of doing things.

Upvotes: 1

Related Questions