I am trying to make a routine system(school, college) where i will use three text field as input1> Class start time(input: 8:00 AM) // when school/college will start.2> Class ending time(input: 1:00 PM) // when all of my class will finish3> Duration of class(input: 1.5(hour))// class hourdesired output: A class routine where time(hour) will be shown in row and Day(e.g, sunday,monday) will be shown in column.questions: 1> how i'll take the input as time:hour from text field?2> how i can save the calculated time in database for use in other page?
i am displaying some news from rss feeds in the page. But i am stuck up in the date time conversion. I got th published datetime as pdt formated string. How can i convert to my local time. Coversion from the pdt string tot DateTime is error..
This second line is error and i need the result in the specified format or same format as in the published date but in local time ie IST (India Standard Time)
I keep getting errors when I try to convert. I have a date row that when my page loads it displays as
1/28/2010 12:00:00 AM.
I have my default value set to '00:00:00" for it. I'm trying to convert it to 24 hour format so that it will read out as 00:00:00 initially. SQL Statement(The one that is working)
SELECT user_id, bpi_title, HoR, Date, Duration FROM tblViewLog2 JOIN tblBPIModules on tblViewLog2.module_id = tblBPIModules.id
I assume that I need to modify my SQL statement, but I'm having a hard time with the exact syntax. I'm trying to figure out exactly what I need to do with the information below in order to get what I want.
14 or 114 24 hour time with milliseconds. HH:mm:ss:fff 21:00:00:000
how do i insert date and time together ? what is the format for this. i tried like this but its not working.
string startDtime = TextFromDate.Text + " " + Stime; sql_comm.Parameters.AddWithValue("@StartDate", DateTime.Parse(startDtime)); is this the right way ? dd/mm/yyy +" "+ 00:00 or i need to make a string that contain this : dd/mm/yyy00:00 its not writing any eror it just do nothing .
Is it better to store images directly in a database or to just store the name of the file in the db and display that file? I would think that just storing the filename of the image would keep the db size low...
I am beginner to sql database and asp.net.I want to fetch datetime from sql database and display it in textbox.I have wrote one stored procedure.The Procedure is
declare @o_Output varchar(30) SET @o_Output = getdate() select @o_Output
Using the above procedure i'm getting current date and time.but my problem is i am hitting ql database while page loading itself. if i am hitting db on 12.40pm means, the textbox showing always the sametime only. I am trying to insert or update some data's into db that time only, i am hitting the db.The textbox datetime(12.50pm) has been changed that time alone. i want to update datetime to textbox at every minutes or seconds.
working with sql server 2005/ visual studio 2005 asp.net c# i just wanted to know ... to insert a date to the database in a field that gets "dateTime" i need to insert the origin syntax. what is the right syntax for the datetime in the database? and to invent for users to insert a wrong sytax ... wich validations i need to put on the field? same question on the type "image" in database it gets like a jpg file? how do i insert an image to the database? If i have a textbox that contain a number ... and i want to ask somthing about the number. how do i do it ? .... like i now that i need to convert it to int i tried this way but it didnt work:
I have a record created date stored as" 2010-05-16 15:44:18.700" in sql server database. When I read this date it gets converted to "5/16/2010 3:44:18 PM" . How should I read it so that I don't loose the ending '700' value so that it gets written exactly to another database.Code for reading the record:
String myConn = ConfigurationManager.ConnectionStrings["DBConnectionString"].ToString(); SqlConnection con = new SqlConnection(myConn); SqlCommand cmd = new SqlCommand();[code].....
On UI Ajax calendar control is used to allow the user Expiry Date as shown below. As this is one of the controls in search, when the Search button is pressed using SQL statement (copied below) data is retrieved from ExpiryDate column of the table. The table creator declared the column type as string and the dates are saved as single digits(Example: 2/2/10 sometimes and sometime as double digits (Example: 02/02/10) I like to know the best practice in retrieving both type of strings from database table. Calendar control
SQL(part of stored proc)
with in button click event stored procedure is called to return search results.