Ask a Question related to Dreamweaver AppDev, Design and Development.
-
webgirljudi #1
Inserting Time to a SQL Database
I'm builidng a program that requires me to record the time of day that a
department physcially receives a document and then when it leaves the
department. I also need to write a report that would subtract the report
ultimately saying that this document was in this department for 45 minutes or
10 hours. So my insert screen needs to be able to accept a manual entry of
time. I can't find a data type that seems to support this. I keep getting
errors. What am I missing? I'm using vbscript and a SQL server.
webgirljudi Guest
-
inserting time
IS THERE A WAY TO INSERT A FIELD WHERE THE CURRENT TIME WILL BE DISPLAYED EACH TIME A PERSON ACCESS THE SITE????? PLZ HELP!!!!!!!!!! -
Inserting both date AND time into one timestampcolumn
Function parsedatetime() will allow you to return a datetime object by combining a date and time string: <cfset dte="jan 22, 2005"> <cfset... -
Inserting and Updating Records at the same time
Hi, Ive created a form which inserts a record into one table within the database, but i also need it to increment a field in another table of the... -
inserting the time into database
hi i have a page where all the stories are displayed, ordered by colomn "date" descsending. the problem is that if two stories are enter on the... -
Inserting a time-out into a movie
I'm creating a touchscreen game and want to insert a time-out whereas if the game is left halfway through for a certain amount of time it will go... -
CarlGrint #2
Re: Inserting Time to a SQL Database
In your Date/Time field in your SQL table you can use the default of Getdate()
which will stamp with the Date and Time that record is created.
When you want to update, this will not work, but you can use Now() in a hidden
field on the ASP page to insert the Date and Time to a field in your DB.
Originally posted by: webgirljudi
I'm builidng a program that requires me to record the time of day that a
department physcially receives a document and then when it leaves the
department. I also need to write a report that would subtract the report
ultimately saying that this document was in this department for 45 minutes or
10 hours. So my insert screen needs to be able to accept a manual entry of
time. I can't find a data type that seems to support this. I keep getting
errors. What am I missing? I'm using vbscript and a SQL server.
CarlGrint Guest
-
webgirljudi #3
Re: Inserting Time to a SQL Database
The getdate() won't work - it's a manual entry. If I received physcial paper
on my desk at 8:00 and don't get to work on it until 10:00. When I enter my
time into this app I need to note both the 8:00 receive time the 10:00 start
time and the say 10:30 finish time. The folks using this program may not enter
the data until they are finished or may record it on paper and transfer it to
the program at the end ot the day. Therefore, I need 3 date/time stamps that
are manual. Does this make sense?
webgirljudi Guest
-
CarlGrint #4
Re: Inserting Time to a SQL Database
Then all you need are the three columns in your database, set to Date/Time
format, then add in fields to your form to take the Times, giving the
approparate titles to ensure your user enters the Time in the correct field.
Originally posted by: webgirljudi
The getdate() won't work - it's a manual entry. If I received physcial paper
on my desk at 8:00 and don't get to work on it until 10:00. When I enter my
time into this app I need to note both the 8:00 receive time the 10:00 start
time and the say 10:30 finish time. The folks using this program may not enter
the data until they are finished or may record it on paper and transfer it to
the program at the end ot the day. Therefore, I need 3 date/time stamps that
are manual. Does this make sense?
CarlGrint Guest
-
webgirljudi #5
Re: Inserting Time to a SQL Database
makes sense, but forgive me, how do I ensure they enter it correctly? Does dreamweaver have an error trapping thing I can add to these fields?
webgirljudi Guest
-
CarlGrint #6
Re: Inserting Time to a SQL Database
You want to use the Yaromat form checker extension, that gives you the option
to ensure a Time is entered, although as with all it is Javascript based, so
you need to ensure Javascript is on.
Alteratively you can write an ASP checker which ensures the form data is
correct before entering into db.
[url]http://www.yaromat.com/dw/?ex=Check%20Form%20MX[/url]
Originally posted by: webgirljudi
makes sense, but forgive me, how do I ensure they enter it correctly? Does
dreamweaver have an error trapping thing I can add to these fields?
CarlGrint Guest
-
-
webgirljudi #8
Re: Inserting Time to a SQL Database
i still must be missing something. I'm still getting the same error.
Incorrect syntax near ':'
it won't take the colon. I'm using an internal SQL server with the datetime type, 8 as the length
webgirljudi Guest
-
CarlGrint #9
Re: Inserting Time to a SQL Database
It is possible that the database expects 18:03:10 and you are feeding 18:03 so
this may be a problem.
Depending on your requirements, you could always do away with the Date/Time
format, and use a varchar field to store the time.
It depends if you wish to carry out calculation on the Times saved.
Originally posted by: webgirljudi
i still must be missing something. I'm still getting the same error.
Incorrect syntax near ':' it won't take the colon. I'm using an internal
SQL server with the datetime type, 8 as the length
CarlGrint Guest



Reply With Quote

