Go Back   Access World Forums > Apps and Windows > Web Design and Development > ASP and ASP.NET

Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Old 09-07-2012, 12:57 AM   #1
Newly Registered User
Join Date: Sep 2012
Posts: 32
Thanks: 7
Thanked 0 Times in 0 Posts
Portucale is on a distinguished road
Send a message via Skype™ to Portucale
Date format keeps changing to US format

Please accept my apologies if I am posting this issue in a wrong place but not sure what to do anymore. I am trying to provide some analysis on HITS into a particular web page, the same is connected to a Access Database.

I have a asp page which is connected to a access database only extracting the USER ID and DATE/TIME, however for some strange reason the date keeps changing to the US format, I have searched and seen so many possible solutions but for the eck of me, I can't make the problem go away.
Below is the code that I use in the asp page:
' simply return the username and domain from the server var
Dim sluDomainUser : sluDomainUser = Trim(Request.ServerVariables("LOGON_USER"))
Dim sluUserIDSlash : sluUserIDSlash = InStr(sluDomainUser,"\")

'Strip off domain and this becomes User ID
sluUserName = LCase(Mid(sluDomainUser, sluUserIDSlash+1))

'Remove domain
sluDomain = UCase(Left(sluDomainUser, sluUserIDSlash-1))

' ok lets create a session record
sql = "INSERT INTO tblUserLogFAQ (ulUserid, ulDateTime) VALUES ('" & sluUserName & " ', #" & Now() & "#)"
If dbQuery(rs, sql)=False Then
' we have been unable to record user id
End If
' End the session
Call EndRoutine()
and again part of the extract from Access

ulUserID ulDateTime
dse31 29/08/2012 15:02
cra04 29/08/2012 15:53
cra04 29/08/2012 16:09
she77 29/08/2012 17:16
lcn01 30/08/2012 09:08
thd02 30/08/2012 12:21
vdf01 30/08/2012 13:05
dem78 30/08/2012 19:59
dav39 31/08/2012 11:21
jam32 31/08/2012 21:47
bky01 09/01/2012 15:10
adn22 09/01/2012 15:11
mil06 09/01/2012 17:42
brs08 09/01/2012 22:18
tak73 09/02/2012 15:42
tak73 09/02/2012 15:44
tak73 09/02/2012 15:44
jys03 09/02/2012 19:22
vig01 09/02/2012 19:48
csa61 09/03/2012 09:19
vdf01 09/03/2012 09:25
vdf01 09/03/2012 09:32
vdf01 09/03/2012 09:33
hap88 09/03/2012 12:29
aal81 09/03/2012 13:07
jll05 09/03/2012 14:38

What is also strange is that only happens for the first 12 days of the month... which makes me think if there is anything wrong with the asp code.

Any help will be very much appreciated.

Vitor da Fonseca

Last edited by Portucale; 09-07-2012 at 01:06 AM. Reason: add another comment
Portucale is offline   Reply With Quote
Old 09-07-2012, 04:07 PM   #2
Wino Moderator
pbaldy's Avatar
Join Date: Aug 2003
Location: Nevada, USA
Posts: 33,371
Thanks: 13
Thanked 4,120 Times in 4,052 Posts
pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold
Re: Date format keeps changing to US format

Access expects dates in code to be in US format. It may not be the problem, but see if these help:


Microsoft Access MVP 2007-2019

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
pbaldy is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Date Format keeps changing to mm/dd/yyyy RascalBird Modules & VBA 3 06-12-2012 01:08 AM
Changing date format michaelc80 Queries 2 01-09-2007 08:04 AM
Changing the format of a Date Picker shaz123 Forms 3 11-14-2006 07:10 AM
[SOLVED] Changing to Date Format yewhiong Queries 1 07-13-2004 07:35 AM
Changing the date format aziz rasul Modules & VBA 2 12-17-2001 01:22 AM

All times are GMT -8. The time now is 01:32 AM.

Microsoft Access Help
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post

Sponsored Links

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World