how to insert time in oracle database????
Insert time
Collapse
X
-
Tags: None
-
I'm not much on proper use of databases... but doesn't that depend on the database you've created? Maybe you are storing the date as a string to be parsed later... maybe as three ints for day, month, year.
Any experts with more experience that can educate the both of us? -
Hi
Well in the most basic form you will execute an INSERT INTO statement, but as tlhintoq pointed out you have to use the correct formatting.
You will most probably build the datetime value in C# and pass it to Oracle via a database adapter or if you simply want to log when something happened you could create a trigger and not use C# at all.
You need to be more specific and let us know what you have done so far and what you would ultimately like to achieve.Comment
-
You have also decide if you mean the time on the client or the server. If you are using the time in the client, you should use DateTime in C#, something like
string time = DateTime.Now.Ti meSpan.ToString ();TO_CHAR(current _date, 'HH:MM:SS')Comment
Comment