|
Hi,
I am Using ASP.NET. I have made a webform where i kept two text boxes. The texboxes are for accepting the dates.
In my database i made three columns where i want the value to be stored.
Now the requirement is:
I wans a help in writing the code for inserting the dates in the colums and simultaneouslt calculating the difference between two dates and putting it in the 3rd column.
Lets Say:
Start Date : 11/14/2007 (the value is typed in textbox)
Close Date : 11/15/2007 (the value is typed in textbox)
Now when i click the submitt button
the date from both the text boxes should enter the data bsse and the difference between them should also be get entered.
The data base has 3 columns
Start_dt , Close_dt, Date_diff
I am able to insert the dates in the columns on clicking the submitt button.
for that i am using insert command
Insert Table_name (start_dt, close_dt, date_diff) values ('" + textbox1 + "', '" + Textbox2 + "', datediff(day, start_dt,close_dt)
the type of date column is datetime and the type of tifference column is numeric.
the values from textboxes are entering properly but i am not getting the calculated TAT for them as well.
Please help me on this.
|
|
|
|
|
|
|
// |