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.
1. I need to convert the local-time of the server on which I run my website to UTC and I don't want to rely on the server local time and timezone (i.e. I don't want to hardcode the timezone information), is there a generic way to do this?
2. Is there a general for converting time between timezones in ASP?
Is there an asp component anywhere which will convert a GMT time in the past to a different time zone e.g. EST? You can't just take the hours off as there is often daylight saving hours to take into consideration.
Ok I am reading a text file (LOG) the time is extracted from the text file and looks like this 07:56:11 with no spaces on either end.
My problem is that the format is not time (when writtern to a varible) so I cannot write it to a table field with a time format. How do I covert the above number into time.
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.
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:
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. ?
I have a time out error from my asp application thought my connection timeout is 6000 sec but when i execute my page it gives me error after 30 sec.Is there any mothod to fix it
I am updating a value in DB by the following command.
strSQL3 = "Update Click_Count Set Click='1'" objConn1.Execute(strSQL3)
The data type for click in DB is nvarchar. I've also tried int and numeric but none of them works. The web page processes for a while and then says "time out".
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'm looking for a script that will call up the date and time on the server. The scripts I've gotten so far seem to use my computers time and date If I change them on my pc they will change allong.how to call up the servers time and date, if possible.
I want to be able to redirect clients based on the server time. This is to direct clients from different parts of the world to different pages. Have seen a Javascript thta does this based on the clients time but can't find anything that does it using the server time.
I now know how to call up the server time and date, but can this also be done for just the hours, minutes, seconds, weekdays, year, month, days. Each of the individually.
I'm looking for the server numbers not the ones from the users pc.
suggest the correct way to store the date & time in SQL Server? I want to store the date and time a record was created. What should the field type be in SQL Server? How can I insert the current date/time into the table using SQL? I used to have date/time field type in access and use the following code
I've been using SSIs for a while now. I'm now using them in a menu system. I'm trying to use multiple SSIs, that is SSIs within SSIs, but I'm just wondering if this will slow the pages down, and put too much strain on the server. I'll try to illustrate what I'm doing.
This is a dropdown menu system. Rolling over Link1 will reveal Link1-a, Link1-b and Link1-c, and likewise with Link2 and Link3: Code:
My server hangs for a really long time after I run the following code...
It is to serve up 3 types of files: a picture, a word document, and an mp3 file from a directory "/uploads" that is not accessible through the URL. The script works perfectly for the picture and doc file, but nothing loads when it is used for the audio files. The files are a few megs large, but after I run it I can't access ANYTHING on the site for quite some time.
What's wrong? Is it something wrong with M@rco's script? Did I impliment it wrong?
I don't mind if it simply takes a long time for it to load the audio file, but it is killing the entire server it seems like. Code:
Do you know any way to load a page, wait for 5 seconds IN SERVER PROCESS, and then redirect in the server side, - not using javascript?
What I pretend is to show a page that loads a .GIF file that appears to be loading something, and after 5 seconds redirect to results page, so users apparently think that a backend proccess has occoured.
When we want to get data access, we need to specify the datasource name and table name in ASP page. I want to know if we can get the list of databases and tables of SQL Server at run time? i.e. The user can choose the database or table to open, and get the records of the table?
I have a chunk of code, where based on the user's selections, it goes through a database and selects all of the records from the database and writes them to a text file (the database contains nearly 600,000 records), currently, the file is written and the user would end up having to wait for it to be written, before continuing.
Is there a way that this file could be kind of.... tagged or something, so that the server creates it in the background, instead of while the user waits, so the user can continue doing other things, rather then having to wait for the text file to be created.
The files can be quite large, as they can end up being anywhere from 1 - about 600,000 records with between 4 - 10 fields each. Here is a sample of the code that creates the text file. Code:
I have created a form that sends email thru my local server. What I want to do is send the email thru our corporate Exchange server. Does anyone know how I can accomplish this task? Please advise. Thanks.
An application runs on server, and is used for Hour-registration. Now I want to run the application local, I use SQL Server 2005, and managed to fix connection changes.
But now, I get this error everytime I run the application:
Microsoft VBScript runtime error Error Code :0x800A01CA
Error source : Error Description :Variable uses an Automation type not supported in VBScript