Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

date problem

Status
Not open for further replies.

parames

MIS
Jun 26, 2000
71
MY
Hi list, previously i was using a normal PC as my webserver with this specs:
windows 2000
mysql database version 3.23
myodbc driver version 2.50

Now, i've changed my server with this specs:
HP ProLiant ML350G3 Server
windows 2003
mysql database version 4.0.17
myodbc driver version 3.51 and also myodbc driver version 2.50

The problem now is, previously when i run a date query;,

Query_su = "select curdate() as curdate,curtime() as curtime"

The curdate value will be = 2004-02-25 (yyyy-mm-dd)
and curtime value will be = 16:10:10

BUT, in the new server the values are as per below:
curdate = 2/25/2004 (m/d/yyyy)
curtime = 2/25/2004 04:10:10 PM

Anyway, i can change the date value by using the date format,
"select DATE_FORMAT(curdate(),'%Y-%m-%d') as curdate"

But, how to solve the time value, i want the return value to be exactly same as the old server value..
Please help...

Thanks a lot,
Parames.S
 
Can you not just change the date and time format in the Server Regional settings??

Mighty
 
thanks mighty, but i've tried that before but it doesn't work...
any suggestions??

thanks,
Parames.s
 
The problem with the regional settings is that it tends to be specific to users. Try setting it up so that the date format is the default for all users.

What you can also do with IIS is set the user account that IIS uses - instead of the default account. Then all you have to do is set up a new user on the server, log in as that user and set the default time and date format.

Mighty
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top