Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Time/Date format and changing time to GMT

Reply
Thread Tools

Time/Date format and changing time to GMT

 
 
Shaiboy_UK
Guest
Posts: n/a
 
      10-18-2003
Hi All,

Sorry if this is the wrong newsgroup to post into, on this topic, if so, please
point me in the right direction.....

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"

Also, as the ASP host I'm using in based in the US (Norfolk I believe),
it is displaying the time not as GMT which the web site would be viewed
in, anyway of changing this?

Thanks for any help.

--
Cheers
Shai Boy
(Remove NOSPAM from email address)


 
Reply With Quote
 
 
 
 
Bob Barrows
Guest
Posts: n/a
 
      10-19-2003
Shaiboy_UK wrote:
> Hi All,
>
> Sorry if this is the wrong newsgroup to post into, on this topic, if
> so, please point me in the right direction.....
>
> 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"


Date/Times are not stored with any format. In an Access database, date/times
are stored as Doubles, with the whole number portion representing the number
of days since the seed date, and the decimal portion representing the time
of day (.5 = noon). It is up to the client (the application that is pulling
the data from the database) to apply any formatting. With ASP, the regional
settings for the IUSR or IWAM account (depending on where the code is
running) are used.

> 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"
>


http://www.aspfaq.com/show.asp?id=2313

> Also, as the ASP host I'm using in based in the US (Norfolk I
> believe),
> it is displaying the time not as GMT which the web site would be
> viewed
> in, anyway of changing this?
>

http://www.aspfaq.com/show.asp?id=2218

HTH,
Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting time historic GMT to local time by specifying a timezone Tharinda C++ 3 08-25-2010 05:32 PM
GMT time to local time, according to timezone and summer/winter time. David Joseph Bonnici Perl Misc 1 05-15-2005 09:15 PM
Log4J - Can you format time in GMT using the .properties file? Jeff O. Java 2 09-28-2004 05:01 PM
Re: Sorting Date/Time Format "Tue, 04 May 2004 03:13:29 GMT" Peter Rilling ASP .Net 0 05-04-2004 07:29 PM
Time/Date format and changing time to GMT Shaiboy_UK ASP .Net 0 10-18-2003 11:30 PM



Advertisments