What is going on there? The times should be incrementing by 15 minute intervals, not 14min and 59 seconds. I have several pages that have suddenly stopped functioning because of this strange date calculating. My web host insists there is nothing wrong with the ASP service.
This sort of stuff really gets me!I've been using the DateAdd function in various places to return results from the last 3 months e.g.
Code:
SELECT * FROM table WHERE publicationDate > #" & DateAdd("m",-3,now) & "#"
It's been working fine until today when I get into work and suddenly no records are showing up.If I substitute a date from 3 months ago for the function, the records reappear.
I'm trying to compare two dates, All I need to see is if the first date is greater than the second date.
I'm fimiliar with how the DateAdd works, I use it often in my SQL Stored Procs, but for ASP it doesnt want to return a value Here's an piece of the code:
If DateAdd(d,DateDiff(d,0,BookingDate),0) > DateAdd(d,DateDiff(d,0,EndDate),0) Then Flag = 0 Else...
I've also tried just printing out the literal value of the expression but that doesnt return anything either.
Test = Cstr(DateAdd(d,DateDiff(d,0,BookingDate),0)) Response.Write("<b><font color='0000ff'>" & Test & "</font></b>")
I need to add 1 day to a specific date. The date have is stored in a variable called "DateOld". The value of the variable have this syntax: mm.dd.yyyy. The new date is the variable called "DateNew".
This is my code that dont work:
DateNew = DATEADD(d,1,DateOld)
What is wrong here? I get this error message: Invalid procedure call or argument: 'DATEADD'.
I'm trying to add hours together in the format HH:MM + HH:MM. There doesn't seem to be a functional part of DateAdd that will accomplish this though ?
The calculation is to work out how many hours have been spent on a website so exceeding the 24:00 is fine. Is there another function that would accomplish this?
I need to display on a web page a 7 day week split up into 30 minute blocks.
I have written the code below to do this. No doubt it is a load of rubbish (I know the bit that prints the days of the week is, but I'm not worried about that for the moment, I'm more concerned about getting the times correct).
The problem is that I cannot get it to print out midnight. The day starts at 00:30:00 and ends at 23:30:00.
Looking at the code below, can anyone suggest how I might be able to do this please?
I know I could just type in something like:
<TD>00:00:00 AM</TD> manually, but I want it to go in via a loop so I can compare it against data that will eventually be pulled from a database.
I'm trying to increment between the end of lunch and the end of the day. The code below is returning a datePart of 13 instead of 1 (for 1:00:00 PM) and 14 instead of 2:00:00 PM etc. If response.write just counter2 I get a real hour. how can I return the actual hour datePart?
I want to use the instr function, but return results from it depending on surtain functions, I can't realy explain so I'll show my example:
I have a string in wich some word I want to find might be in diffrent Capital Letters order, I want the Instr function to return all the values of the place of that word (avcourse I'll run a for and increase the starting point of the Instr func until it returns 0). The instinct thought is to use the Lcase or the Ucase functions, but in this case I don't know how to use them. In the same Idea I wanted to use the Instr Func with the trim Func, But Its realy the same principle if I just understood how to do so.
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?
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...
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 %>
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?
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.
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.
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"
i have a page that enters numbers stored in different values e.g monday tuesday wednesday thursday friday into a database. is it possible in asp to add those values up and store the added up value in a seperate field in the database bascially total =monday+tuesday+wednesday+thursday+friday How would i do that in asp.
I am using Dreamweaver MX to create ASP and MS SQL Server for database. I got a few fields like Value1 - Value5. So i have create the recordset of the 5 fields and i am extracting the total count of each field. Now i got 5 recordsets showing the total of each field. So is it possible to add the value of the 5 recordset together into one value? And is it possible to use the value of the recordset to do some simple math addition, subtraction, multiplication and division?
I need to add a ppicture to my Database.. The table is accessed through ASP Recordset but having troubles trying to insert an individual picture to each record?
I need to be able to add multiple records quickly, for example I need to add
name value abc 1 abc 2 abc 3 abc 4 abc 5 abc 6
etc etc, does each record have to be added separately, or is there a way I can add a chosen number of records, lets say 10, and have the value field increase by one each time?
sometimes I might have 30+ simple records that need adding quickly, and each time the first records value will be one, and each record after will increase by one, is there a way to solve this problem or does each record have to be added separately?