Set Exact Time
im defining a cookie as so:
Response.Cookies("something")("value") = "value";
now i want it expire in 20 minutes.. how do i do that? i tried to give the .Expired property a date object but it faild.
im defining a cookie as so:
Response.Cookies("something")("value") = "value";
now i want it expire in 20 minutes.. how do i do that? i tried to give the .Expired property a date object but it faild.
I'm uploading a file locally and I'm trying to passing it throug a variable and I'm having a problem with locating the exact file name from the upload_document page. I thought is was "r_title" but for some reason the file name isn't stored there.
View Replies View RelatedI am using ASP to query access db on IIS5
I need to find exact matches for search terms within a string. EG "cat" will find cat but not catastrophe from within a large string.
I cannot use "=" as that would match the whole string and I only want to find the exact match within the string.
I am trying "like '%[!a-z][search term][!a-z]%'" which is pretty clumsy and also doesn't pick up the search term if it is at the beginning of a sentence.
Can anyone help me with the syntax here? I have racked my brains coming up with all sorts of convoluted solutions that all end up having a flaw. I have been looking around ASP fora and it seems a few people are asking the same question but getting no answers. (you might see my question in some of them...) I am sure there must be some operator within sql as there is in FMP but I cannot find it.
regarding EXACT search. i want let user search with ANY or EXACT match. i had done any with
instr(products, '"&st&"') > 0
where products is my database field, from where search result come and st is the search string entered by user. now want to provide EXACT search. e.g. machinery will match only machinery and not machine, machineries, machines etc. i had tried LIKE predicate. is there any other way to provie EXACT match ?
i m doing a custom search. i have included SEARCH USING:
1. ALL OF THE WORDS
2. ANY OF THE WORDS
3. EXACT EXPRESSIONS
i m not able to have the search results using option no. 3 EXACT EXPRESSIONS. how to do that thing ?
i want to provide exact match. e.g. if user enters pharma machine result only display records containing pharma machine and not records containing either pharma or machine.
database table: company_info
database field: products
user entered search (field name): st
i had tried the following
select * from company_info where products like '"&st&"'
but is shows the wide result
Here's the problem I'm running into:Code:
Set RS = Conn.Execute("SELECT TOP 10 id, score, numvotes FROM [user] WHERE active = '1' ORDER BY (score/numvotes) DESC")
Simple query, nothing to fancy. However it doesn't order highest to lowest correctly. Here's a sample output:
10.00
10.00
9.63
8.00
8.25
8.00
7.00
7.82
7.42
7.86
As you can see it's not correctly ordered from highest to lowest.
i am doing a database search project. and i would like to know how do i get exact keyword searched from the database. for e.g. if the user enters keyword as "lan" to be searched it should return only records that contain exact keyword "lan" and should not return "plan" and other words like that.
View Replies View Relatedi get "system cannot find the file specified" error. iam sure that the path of file iam looking for is true. i guess this is a friendly message thrown. when i turned off the freind messages in IE (client side) i still get the same error. is there any way that i can see the exact error so that i can debug.
View Replies View RelatedI 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.
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:
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
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:
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 RelatedHow will we convert the system date & time to other timezone for eg: Eastern Time zone using ASP?
View Replies View RelatedWhen 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. ?
Any some tools or sample codes drop down asp script execute time and
database connection time ?
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.
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.
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.
i am trying to get a time variable which is 30 minutes before the current time to use in a calculation.
The code I am using is:
validationtime=time-3000
response.write(time)
response.write ("<BR>")
response.write(validationtime)
but the response I get is incorrect along the lines of:
11:54:42
14/10/1891 12:05:18
What am I doing wrong, why is validation time also including a date
Can someone tell me how i can use a if loop
its related with time I want to display a registration form on 29 Jan 2007
only between 10am pacific time to 1pm pacific time
so only between 10am - 1pm pacific time the registration form should appear
i live in the central time zone
can someone tell me how i can make this happen.
I am trying to use the time function to determine whether or not it is morning, afternoon or evening.
I wrote my code and then changed the values it is comparing with to see if would work and it doesn't, it just stays on the good morning.
<% if time > 0 then %>
Good Morning <b><%= Session("sessFirstName") %></b><br><br>
<a href="logout.asp">Log Out</a>
<% end if %>
<% if time > 12 then %>
Good Afternoon <b><%= Session("sessFirstName") %></b><br><br>
<a href="logout.asp">Log Out</a>
<% end if %>
<% if time > 18 then %>
Good Evening <b><%= Session("sessFirstName") %></b><br><br>
<a href="logout.asp">Log Out</a>
<% end if %>
Do i need to put quotes around the number i am checking with?
how can i get this tag to adjust for time zones? This is probably simple, but i just can't think of how to do it. Code: <%=Time%>
View Replies View RelatedI am writing an XML file with lots of Data and it takes time but before the operation can be finished I get this error
Quote:
The maximum amount of time for a script to execute was exceeded. You can change this limit by specifying a new value for the property Server.ScriptTimeout or by changing the value in the IIS administration tools.
How do I handle this?
Would anyone know if there is an easy and clean way of presenting maybe a time control field in html in an .asp page that allows a user to specify a certain time of the day? Currently using an <input name="SpecifyTime" type="Text"field but was wondering if there was a better way of doing this as to where users won't mistype in entering non time related characters?
View Replies View RelatedWould it be a stupid idea to use the Log Util component to retrieve the UTC date/time? It appears that the DateTime property could be used for this, but I'm not really sure how it searches through the log file.
View Replies View RelatedI've used this ASP funtion to display the time on my web page:
Date: <%= FormatDateTime(Date, 1)%>
Time: <%= FormatDateTime(now, 4)%>
THis was working fine until i moved my site to a server based in the states, not the time is 5hrs behind. help me resolve this?
I am using ADO to connect to SQL 7.0. At times the connection timeout expires. Is there any way to inrease the default time out? I think currently its 60 secs. Here is the code that I use to establish ADO connection.
set rs = Server.CreateObject("ADODB.RecordSet")
sCon = "DRIVER={SQL Server};
SERVER=Indy2;DATABASE=ProdProtrans;UID=xx; PWD=xxxxxxx"
How to find GMT time in ASP?
View Replies View Relatedi have two rows in data base with similar data except the time coloumn , the time coloumn is the only one with differnt times ex: 08:00am in one row and 9:00am , form the sql query when i taken the results where name='"&name&"' themn i am getting only one name . how can i compare the time with system time and get them login accordingly.
View Replies View RelatedDo we have any function in ASP that will convert US time(which is captured in the database) to IST
View Replies View RelatedI have a simple asp script that pulls data from an ingres database and
displays it on screen.
It all works fine except for date/time fields where the date >=
24/10/2004 and <= 31/10/2004 where it takes 1 hour off the time ie
in the database I have 24/10/2004 08:00
the asp displays 24/10/2004 07:00
The same thing happens for the same date next year.
Any thoughts?