Adding Time Fields
I have 2 time fields like this:
time1="00:20:23.36"
time2="00:22:20.20"
and the result when added shud be
total time:"00:42:43.56"
I want to add these 2 TIMES.I retreive this information from a form.Any kind of information about adding these 2 date fields will be too helpful.I'm storing this in an Access DataBase.
View Replies
ADVERTISEMENT
Say I have to different recordsets that have the fields:
rsA.Fields.Item("A").Value ,rsB.Fields.Item("B").Value
How would I add those to fields? It may be my inexperience but when I
tried something like
rsA.Fields.Item("A").Value + rsB.Fields.Item("B").Value
didnt work because one of the fields was a empty value. I have about
6 fields i need to add together if a value exists in any of them.
Suggestions?
View Replies
View Related
I am requesting cost information from three databses and trying to add them together using asp but I am having problems.
totalCost = data01("cost") + data02("cost") + data03("cost")
when I try to display totalCost <% =totalCost %> it comes out as 5.005.005.00 just joining them together not adding then together I tried formating the data using formatNumber() but that didn't work either. If anyone could point out to me what I'm doing wrong.
View Replies
View Related
I found a recordpaging script that works fine except when I try to add additional fields. This script came with 3 field and 3 headings.
Adding addtional headings are easy but when I tried to add addtional fields, I don't get an error just a page with 5 headings and 3 fields. Take a look at the file an it's .inc file attached. I can't see where the field is referrenced from.
View Replies
View Related
What I am looking to do is dynamically add an amount of text boxes depending on a user's choice on a static textbox. (when a listbox entry has been entered a number of textboxes would appear).
I have been deliberating this problem for a while and the best I got was to produce ascx files for each scenario, and use if statements for each user choice. The choice would initiate the number of textboxes for that given choice.
View Replies
View Related
how do i add afew items into a database of only a field name?
for example if there is only item_1.. it will add item_1 only. but if there is item_1 & item_2. how do i add them to the database name ("Items No")?
View Replies
View Related
is it possible to dynamically add a field into a table? or add a table? Lets just say that I have a DB with 10,000 entries and about 5MB in size. I want to add a new feature and for this i need to add an extra field to the table. I don't want to d/l the DB, make the changes locally and then u/l again, so can I do it via script?
View Replies
View Related
This code has worked in the past on this same page, and for some reason it doesn't want to calculate the numbers anymore. Anyone see anything that is out of whack?
Basically I am taking the input numbers for each field and adding them up on one column, then taking the totals of all of those columns and adding it up to display as an overall total. Code:
View Replies
View Related
i have 2 tables;
table01:
fields are
field01,field02,field03,field04,field05
and another table
table02:
fields are
field01,field02
when someone submits the form, i want to add the infos supplied by the user to be added to these 2 tables.
field01 & field02 shall be added to tables 1 & 2;
&
field03,field04 & field05 to table01 only
i tried using this code:
myquery = "INSERT INTO table01 (field01,field02,field03,field04,field05) VALUES ('" & f1 & "','" & f2 & "','" & f3 & "','" & f4 & "','" & f5 & "')"
myquery2 = "INSERT INTO table02 (field01,field02) VALUES ('" & f1 & "','" & f2 & "')"
adocon.execute myquery,myquery2
but this one only adds to the first table.
can someone tell me how to fix the problem?
View Replies
View Related
I have a database that contains a release list for some products. It's constructed like this:
ID (autonumber)
ProductID (relatednumber)
Date - the date for release
Approx - (number related to text en other table = ApproxRelation)
ApproxYear - (number)
The Approx is a number related to antoher table containing the corresponding text - like "1st quarter", "January", "March" and so on.
I want to sort the release of the products by date, but then mix the sorting with the approximated dates. Like: Code:
View Replies
View Related
I would like to display the difference between the logging time
[Session("start"] and the current time [now]. In hours minutes and seconds,
I have tried a couple of things but all I see is gobbledy gook.
View Replies
View Related
I have a website that I subscribe to that allows me to track tasks. I have an extra computer with a big monitor that i want to always display the task list. the problem is after so many hours I get logged out.
I need to need to reload that sign in url every few hours Code:
View Replies
View Related
there i was just windering how do i compare a date/time vlaue in sql server agaisnt the computers' date/time.
for example, if computer date/time is two months or 2 weeks before the database date/time do something
View Replies
View Related
Currently working on a ASP for a friend, which requires the date and
time on it. It pulls in entries from an Access Database with dates and
times in the format of:
"Fri Oct 17 18:02:46 2003"
However my date and time on the ASP page is displayed as:
"Friday, October 17, 2003 18:02:46"
using the script:
"<%Session.LCID = 1033%>
<%=FormatDateTime(Date(), vbLongDate)%>
<%Session.LCID = 2057%>
<%=time()%>"
Anyone know how to change this script, fully or partly to produce the
date and time on the format that's in the access database i.e. "Fri Oct 17
18:02:46 2003" Code:
View Replies
View Related
I am working on a database that collects information about incidents. One of the fields that people enter is the time of the incident. I am trying to convert that string that people enter into a OdbcType.Time and I am at a lost.
View Replies
View Related
How will we convert the system date & time to other timezone for eg: Eastern Time zone using ASP?
View Replies
View Related
When the Form is submitted I use the Date() and Time() functions to put the date and time into the Body part of the e-mail. The time reported is three hours earlier than the time at which the Form is actually submitted.
I understand these functions are evaluated on the server so the server must be in a time zone three hours earlier than where I am . Is there any way I can get the local time at the location where the user is actually located. ?
View Replies
View Related
Any some tools or sample codes drop down asp script execute time and
database connection time ?
View Replies
View Related
I'm trying to do a very simple code that converts the server time into a time zone of your choice.
<%
dim h 'Current Hour
dim i ' Time Zone Increase - add or subtract hours
dim r 'Result Here
h = Hour(Now)
i = + 2
r = h + i
%>
but obvisouly i'm having trouble with the time zone convert.
View Replies
View Related
I am trying to compare the NOW time with a "deadline" time. Please help. Just not sure why this is not working. I need to be able to say IF IT'S BEFORE 9:30 TODAY, IT'S OKAY TO ADD SOMETHING. IF IT'S AFTER 9:30 TODAY, YOU MUST ADD IT TOMORROW.
CODE:
nowtime=now()
deadlinetime=formatdatetime(now(),2) + " 8:30:00 AM"
response.write "NOW: " & nowtime & "<BR>"
response.write "Deadline: " & deadlinetime & "<BR>"
if nowtime<deadlinetime then response.write "can send out today" end if
if nowtime>deadlinetime then response.write "must send out tomorrow" end
if
RESULTS:
NOW: 1/18/2007 8:51:43 AM
Deadline: 1/18/2007 8:30:00 AM
can send out today
As you can see, NOW is GREATER THAN Deadline, so it should must send out tomorrow.
View Replies
View Related
i want to calculate the total time between to dates and time.
Example: Total time elapsed from date 1 time 1 to date 2 time 2.
27/09/2004 11:00 - 28/09/2004 10:30
The user enters a record and then later comes back and closes it. I need to know the time it took from when they entered the record until the time it was closed.
View Replies
View Related
I have a form on my asp page that sends data to an emailing script. I am working with other peoples code which is causing a lot of hassle. Is there any way of sending a Bcc address command from the form rather than the emailing script?
View Replies
View Related
I wanted to know how I should go about doing this. I have this query:
SQLmax="SELECT Max(OrderNumber) AS intTotal FROM Status"
Which gives the Max(OrderNumber).Say in this case it is giving out put as 37.
Now i want the output to be displayed 38,which can be done by adding 1 to Max(OrderNumber).
Should i get this by doing this way?
var=RS(intTotal)
var=var+1
Response.WRite var
Is this right?
View Replies
View Related
Im using this code to pass a value to a variable:
<a href="Artists.asp?cat=<%=Server.URLEncode( rsuser( "art_Artist" ) )%>"> <%=rsuser( "art_Artist" )%></a>
How do I add another value to this link with the variable name catArt so that I can add:
?catArt=<%=Server.URLEncode( rsuser( "art_Artist" ) )%>
View Replies
View Related
what do you think is the best way to implement an "add new row to table" functionalilty?
am using asp(obviously )im currently using document.createElement with javascript, but im having a hard time retrieving the data.am also thinking if this is really the best way to do this.or if this would work with all other browsers other than IE...
View Replies
View Related
how to add a password to using this connection string
<%
set conn = server.createobject ("ADODB.connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.Mappath("dat48372.mdb"))
set rs = Server.CreateObject("ADODB.recordset")
SQL = "SELECT Price FROM DABRadios WHERE (ID LIKE 6)"
rs.Open SQL, conn
showall=true
%>
View Replies
View Related
i have a id1 field which has data like this 002,003,004 and i have to increment it by one when i add a new customer so this is what i do
Set rs1 = Server.CreateObject("ADODB.Recordset")
sql1="Select Max(id1) from table2"
rs1.Open sql1, Conn ,2,2
maxid=rs1(0)
so i get the maxid for example as 003. the next record will be added and it should be 004 and i do it in this way maxid= maxid+1
but when the record is added the id1 field has a value of 4 instead of 004
View Replies
View Related
I want to fix this problem, i dont no how. Bassicly there is blank data appearing in my database, for no apparant reason! Code:
View Replies
View Related
How can I add a new user on my server using ASP?
User example: myserver/user1
View Replies
View Related
I'm new to ASP and a few querys
I have created my database in Access with the following fields
StockCode (Text Box, Primary Key)
Item (Memo)
Price (currency)
Picture (memo)
OnOffer (Yes/No)
and I know that access table cannot have a picture in it, only a access
form using OLE, but how do I get my asp page to display a picture for
every record? The picture would be a picture of the product with the
Stockcode as the filename - m001110.jpg?
View Replies
View Related
I have an ASP page with a table that fills with records from a loop. Every
row gets a link to another ASP page with data from the row. The link is
written as <a href=newpage.asp?value1=xx&value2=yy .... and so on.
Now I try to let the user specify a number that should be sent to the other
page. But I do not want to clutter up every row with each an input field,
so I thought instead I would place it above all the data rows. When the user
clicks on the link, I want to include the input field to the querysting. The
problem here is that I cannot figure out how to refer to the name of the
input field.
View Replies
View Related
I have just finished building my first shopping cart in asp and MS Access. Originally the shopping cart was to be built for products with no size and colour, however as usual the goal posts have moved and I now need to incorporate a size and colour option for each product. Could anyone explain to me how I can go about doing this i.e. adding the different sizes and colours in the admin website and then linking them to a specific product when it is displayed on the products page? I know they both need to be in a dynamic drop down box when displayed on the products page within the shopping cart, but I am just wondering how to read the correct values out from the table depending on which product is being displayed. I have a normal products table at the moment with general fields i.e ID, name, description etc.
View Replies
View Related
I have a web page hosted by server1. I need to add a link to a web page hosted by server2. This part is simple. However, I also need to give the linked web page the user id for the user that was validated in server1 (it's in a session variable).
At first, I thought the following would work:
mywebpageonserver1.asp:
Response.AddHeader "MYUSERID", "whatever"
Response.Redirect "http://server2/mywebpageonserver2.asp"
On server2, mywebpageonserver2.asp:
View Replies
View Related