Changing Time Locale.....
I am using:
<%
Locale = Session.LCID
Session.LCID = &H1033
Response.Write FormatDateTime(Time)
Session.LCID = Locale
%>
as I am hosted on a US server, but I need to display the time in GMT. This code still displays the server time though. Would it be better to just display <%=Time()%> and then knock 5 hours off the US time? If so, would <%Time(-5)%> work?
View Replies
ADVERTISEMENT
In our legacy asp/web-application, we have
date/time-input form in USA style
(i.e. mm/dd/yyyy and 12hour-scale time with AM/PM).
There is also some validation code on client side,
and then submitted data are used in MSSQL queries.
Now I would like to know about how to generate locale-dependent
HTML form layout, and what ready-made ASP code could I borrow
for this task.
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'm using brinkster, and am trying to change the Time Zone, 5 hours forward to London UK time, and also, reduce the rime by 7 minutes, as their server is off by that many minutes - I asked them to change it, the said no, it's correct, but I synchronse time with time.windows.com and the time was 7 minutes behind from brinkster.
You may think I'm being a pain, but on my site, the products I add are time dependent and people need to know the exact time. the code is below, of course, with everything I try, I get an error, can someone please figure out my mistake. Many thanks + Happy new year every1
Code:
<%=(DateAdd("n",-7,now()))(DateAdd("h",5,now()))%>
View Replies
View Related
i can use this to change the time on my site by +2 hours:
offsetminutes=120
thetime=dateadd("n", offsetminutes, time())
but, say it's 11pm.. the script above will make it 1am, but will the date in " date() " go ahead one day too?
the other thing i could do is this:
offsetminutes=120
thetime=dateadd("n", offsetminutes, now())
using now() instead of time(). but then when i want to print " thetime " onto a page, ill get something like "7/11/2005, 5:10:13 PM". how could i then separate the new date from the new time and print them to a page separately?
View Replies
View Related
Which Locale ID (LCID) displays YYYY-MM-DD (ISO 8601)?
View Replies
View Related
We have a classic ASP site running on IIS 5. We will be using a com
component to handle session state so we can share state between .net and
classic. This means switching the IIS session state off. Prior to this
locale was set in the session. Switching the session off means the dates
start displaying in a US format, not British. Is there any way of setting
the Locale as UK easily.
As it is IIS 5 we can't use response.lcid, I don't
want to mess around with regional settings on the machine as our
applications aren't very well designed :) and I will get the blame for
breaking them. I don't want to put a page directive in over 1000 asp page.
Is there anyway of setting it at an application level in IIS.
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
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
Last week I posted in the graphics forums regarding a photo I have that I needed to slowly change from day to night.Now I have the various stages, I need them to display on my site, according to the time of day.For example:
Between 5am and 7am display the early morning picture
Between 7am and 5pm display the day picture
Between 5pm and 7pm displayy the evening picture
and so forth.
View Replies
View Related
I'm having a domain change foisted upon me and the test I did resulted
in every last ASP and
ASP.Net script stopping cold. Nothing but plain old html worked.
Is there a FAQ or some other document available that outlines what has
to be done when the
IIS server machine is disconnected from one domain controller and
reconnected to a totally different one? If not, does anyone here know
what would have to be changed to make the ASP code play nice in the new
domain?A relevant bit of info, they're also changing the name of the
administrator account. I don't know if that would contribute to the
death of ASP* on the system, but it might.
View Replies
View Related
i have an insert record and edit record page. When inserting to the db, it uses now(). When I go to edit an existing record the date stays as the original date. How do I make the date change to the amended edit date?
View Replies
View Related
I have used ASP for years using MS Access and have used MSSQL quite a lot as
well. I have never came across something like this before.
MSSQL table names and types:
ProductName nvarchar
ShortDescription nText
ThumbNail nvarchar
etc
When I have the recordset in the order as follows, all works well:
(Recordset2.Fields.Item("ProductName").Value)
(Recordset2.Fields.Item("ShortDescription").Value)
(Recordset2.Fields.Item("Thumbnail").Value)
Though if I have the Thumbnail first the description does'nt show.
View Replies
View Related
how best to convert an application which is all in English to be able to roll the app out to say Germany or France and it all appears in the correct language
View Replies
View Related
My site uses frames.I have a header frame, a menu frame and a main frame. When the page opens, the header frame and the main frame are generic. The main frame has a log-in dialog. Once the user logs in, they are taken to a 'main' page and I want to replace the header and menu frames with other frames .
View Replies
View Related
I need to set up an HTML table or the like, with 4 columns.
Each column needs to have a header with a FRIDAY (dd/mm/yy) date.
i.e. this weeks Fridays date is 16th Feb, the following is 23rd Feb
etc.
So, I need column 1 to be headed 16th Feb, col 2 to show 23rd Feb etc.
As this week passes, the dates need to move up 1 week, so that next
week, col 1 will display 23rd Feb and so on.
These headers need to change according to the date.
Please can you advise how I best achieve this ?
View Replies
View Related
I was talking to someone back at Uni. He showed me his web site. He had - and + to increase the size of his web page or to decrease it so the user can always see everything on screen.
He did it in asp. I'm interested to know how it was done.Does anybody know how to do this?
View Replies
View Related
I have two textbox in the form. what i want to do is update the second text box based on the sponsorid entered by the user. I want to display the member name based on the memberid which is retrieved from the database on the bases of entered sponsorid by the user.
i extracted all the data when the page loads from the database but unable to call it on blur event of the text box. The variables cannot be accessed in the vbscript because these are for server side and not accessable on the client side. What is the way around this problem.
View Replies
View Related
When I create a simple page with this code, the sessionID shows differently
each time I refresh the page.
On every other refresh it is blank, on every other, it is new. What is
happening here?
Dim sessStr as String
sessStr = Response.Cookies("ASP.NET_SessionId").Value
Response.Write("Session ID=" & sessStr)
View Replies
View Related
i am running iis and apache both.now i want to change the port of iis to e.g 70.how can i change it?
View Replies
View Related
I want to convert the first character to Upper case, while the rest remain lower case.
variable = lcase(left(blablabla,9))
let say now the "variable = abcdefghi"
How can I convert ONLY the first character to uppercase?so that the variable will be holding "Abcdefghi" ?
View Replies
View Related
i want to know how to change the password or replace it with new password and for more details see the attachment. note that i am using Dream weaver for development and Access database to save users information.
View Replies
View Related
I have domain name, eg www.abc.com. Use the Dynamic DNS web site to register. How the IP of www.abc.com. can be shown once I click The Domain Name,e.g.click http://www.abc.com.
Then show http://123.123.123.123
Is it the ASP program can help me? or any other solution.
View Replies
View Related
I am running a marquee across the top of my page. The text for the marquee is initially loaded from a SQL Server Database. However, as users look at this page the text may be updated by an administrator of the site.
To account for this, I tried to use VBScript to code the onstart event of the marquee. In the script I was trying to check for updated text but I don't believe it is possible as it seems the database code only runs on initial loading of the page. Any ideas on how to requery the database for the updated text?
View Replies
View Related
I run a site using a blog script (dblog) where if you want to open an article from the homepage, it links to a page called article.asp. For example if I want to open article 101 the link goes to article.asp?article=101 but the title (the metatag) is always the same.
What I want to do is having the title change from article to article, retrieving it from the database. So if I open article.asp?article=101 the <title> displays the title of the article 101.
View Replies
View Related