changing default date format on server

changing default date format on server

am 24.03.2005 16:26:44 von Mark Mchugh

hi,
How can i change the default date field to european
format, i.e. dd/mm/yyyy ?


thanks

MArk



__________________________________
Do you Yahoo!?
Yahoo! Mail - 250MB free storage. Do more. Manage less.
http://info.mail.yahoo.com/mail_250

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

Re: changing default date format on server

am 24.03.2005 16:56:33 von SGreen

--=_alternative 0057D99685256FCE_=
Content-Type: text/plain; charset="US-ASCII"

Mark Mchugh wrote on 03/24/2005 10:26:44 AM:

> hi,
> How can i change the default date field to european
> format, i.e. dd/mm/yyyy ?
>
>
> thanks
>
> MArk
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - 250MB free storage. Do more. Manage less.
> http://info.mail.yahoo.com/mail_250
>
You don't. The server's internal representation of dates is not something
you can modify.

However, your _client_ may have many ways to format date data for viewing.
How you change _what_you_see_ depends entirely on which tool you are using
to get data from the server and present it for viewing or other
operations. Refer to the documentation for the client you are using for
details on how to get it to show you dates in the format you want to see.

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

--=_alternative 0057D99685256FCE_=--

Re: changing default date format on server

am 24.03.2005 17:06:50 von Mark Mchugh

i am using the following code, and still getting bad
results in the table when i view it

If rendate < Now Then
rendate = DateAdd("yyyy", 1, rendate)
End If
rendate = Format(rendate, "yyyy/mm/dd")
Debug.Print rendate;


sqlstr = "update policies set renewdate = '" &
rendate & "' where polnumber = '" & polcode & "';"
Set rs1 = New ADODB.Recordset
rs1.ActiveConnection = connMySQL



the date formate is not correct?
--- SGreen@unimin.com wrote:
> Mark Mchugh wrote on 03/24/2005
> 10:26:44 AM:
>
> > hi,
> > How can i change the default date field to
> european
> > format, i.e. dd/mm/yyyy ?
> >
> >
> > thanks
> >
> > MArk
> >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Mail - 250MB free storage. Do more. Manage
> less.
> > http://info.mail.yahoo.com/mail_250
> >
> You don't. The server's internal representation of
> dates is not something
> you can modify.
>
> However, your _client_ may have many ways to format
> date data for viewing.
> How you change _what_you_see_ depends entirely on
> which tool you are using
> to get data from the server and present it for
> viewing or other
> operations. Refer to the documentation for the
> client you are using for
> details on how to get it to show you dates in the
> format you want to see.
>
> Shawn Green
> Database Administrator
> Unimin Corporation - Spruce Pine
>



__________________________________
Do you Yahoo!?
Make Yahoo! your home page
http://www.yahoo.com/r/hs

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

RE: changing default date format on server

am 24.03.2005 17:09:34 von bullijr

------=_NextPart_000_0010_01C53061.F5DDC540
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: 7bit

FYI - date change can be made by

CLIENT:
mysql> set date_format = '%m-%d-%Y';
**OR**
mysql> set date_format = '%d-%m-%Y';

SERVER:
mysql> set global variable date_format = '%m-%d-%Y';
**OR**
mysql> set global variable date_format = '%d-%m-%Y';


Don't know if it goes past a shutdown and restart, but it will work for
now... =)

J.R.

-----Original Message-----
From: Mark Mchugh [mailto:mark_mch@yahoo.com]
Sent: Thursday, March 24, 2005 10:27 AM
To: mysql list
Subject: changing default date format on server

hi,
How can i change the default date field to european format, i.e. dd/mm/yyyy
?


thanks

MArk



__________________________________
Do you Yahoo!?
Yahoo! Mail - 250MB free storage. Do more. Manage less.
http://info.mail.yahoo.com/mail_250

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=bullijr@innovatim.com


------=_NextPart_000_0010_01C53061.F5DDC540
Content-Type: application/x-pkcs7-signature;
name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="smime.p7s"

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEH AQAAoIIIyzCCAlMw
ggG8oA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sOAwIaBQCgggG8MBgG CSqGSIb3DQEJAzEL
BgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTA1MDMyNDE2MDkzNFowIwYJ KoZIhvcNAQkEMRYE
FMOoBUDExpbBlhARSWSedg/4mdwiMGcGCSqGSIb3DQEJDzFaMFgwCgYIKoZI hvcNAwcwDgYIKoZI
hvcNAwICAgCAMA0GCCqGSIb3DQMCAgFAMAcGBSsOAwIHMA0GCCqGSIb3DQMC AgEoMAcGBSsOAwIa
MAoGCCqGSIb3DQIFMHgGCSsGAQQBgjcQBDFrMGkwYjELMAkGA1UEBhMCWkEx JTAjBgNVBAoTHFRo
YXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQ ZXJzb25hbCBGcmVl
bWFpbCBJc3N1aW5nIENBAgMNsGwwegYLKoZIhvcNAQkQAgsxa6BpMGIxCzAJ BgNVBAYTAlpBMSUw
IwYDVQQKExxUaGF3dGUgQ29uc3VsdGluZyAoUHR5KSBMdGQuMSwwKgYDVQQD EyNUaGF3dGUgUGVy
c29uYWwgRnJlZW1haWwgSXNzdWluZyBDQQIDDbBsMA0GCSqGSIb3DQEBAQUA BIGAJkcSgAvCxS86
z+VrW2QKADLdu9ShsrvXOzshmag6/GG6qM+ogH4sFsbMyBwmb+pH8qWBG8Av uNGrfA1Ckjw0urvj
aTJGi2CY5OX2DZOklIRf5uX1lclz1yITdTJZd9GCRRY6y7O/imXe6loIPZb6 etuaKoEwd4hQj/0I
tTY2QpMAAAAAAAA=

------=_NextPart_000_0010_01C53061.F5DDC540--

RE: changing default date format on server

am 24.03.2005 17:21:01 von Tom Crimmins

On Thursday, March 24, 2005 10:06, J.R. Bullington wrote:

> You can change it on the command line by
>
> mysql> set date_format = '%m-%d-%Y';
>
> However, this may be a client-only view, as I am still trying to get
> the global variable to change.

[shell]
#mysqld -v --help | grep date_format
--date_format=name The DATE format (For future).
date_format (No default value)
[/shell]

This has been said before, but date_format is not implemented on the
server. You can set it, but I don't think it does anything.

>
> J.R.
>
> PS - Sorry it took me so long Mark, was busy and AFK
>
> -----Original Message-----
> From: SGreen@unimin.com [mailto:SGreen@unimin.com]
> Sent: Thursday, March 24, 2005 10:57 AM
> To: Mark Mchugh
> Cc: mysql list
> Subject: Re: changing default date format on server
>
> Mark Mchugh wrote on 03/24/2005 10:26:44 AM:
>
>> hi,
>> How can i change the default date field to european format, i.e.
>> dd/mm/yyyy ?
>>
>>
>> thanks
>>
>> MArk
>
> However, your _client_ may have many ways to format date data for
> viewing. How you change _what_you_see_ depends entirely on which tool
> you are using to get data from the server and present it for viewing
> or other operations. Refer to the documentation for the client you
> are using for details on how to get it to show you dates in the
> format you want to see.
>
> Shawn Green
> Database Administrator
> Unimin Corporation - Spruce Pine

--
Tom Crimmins
Interface Specialist
Pottawattamie County, Iowa

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

Re: changing default date format on server

am 24.03.2005 17:44:21 von SGreen

--=_alternative 005C39E485256FCE_=
Content-Type: text/plain; charset="US-ASCII"

My responses interspersed...

Mark Mchugh wrote on 03/24/2005 11:06:50 AM:

> i am using the following code, and still getting bad
> results in the table when i view it
>
> If rendate < Now Then
> rendate = DateAdd("yyyy", 1, rendate)
> End If
> rendate = Format(rendate, "yyyy/mm/dd")
> Debug.Print rendate;

I would use
rendate = Format(rendate,"yyyy-MM-dd")

Small m is for minutes not months and the dashes are what MySQL prefers.
Since I assume this is a date (no time value), the minutes were 0 so your
formatted string should have looked wrong. For example March 15, 2004
should have formatted as: 2004/00/15 .... What was your Debug.Print
showing you?


>
> sqlstr = "update policies set renewdate = '" &
> rendate & "' where polnumber = '" & polcode & "';"
> Set rs1 = New ADODB.Recordset
> rs1.ActiveConnection = connMySQL

Why are you using a Recordset to execute an UPDATE statement? There are no
records to retrieve in the results of an UPDATE statement. Instead use
Connection.Execute().

'if you don't care about the return value
connMySQL.execute sqlstr

'if you do
retVal = connMySQL.execute(sqlstr)

>
> the date formate is not correct?

I don't think it was. See above.

> --- SGreen@unimin.com wrote:
> > Mark Mchugh wrote on 03/24/2005
> > 10:26:44 AM:
> >
> > > hi,
> > > How can i change the default date field to
> > european
> > > format, i.e. dd/mm/yyyy ?
> > >
> > >
> > > thanks
> > >
> > > MArk
> > >
> > >
> > >
> > > __________________________________
> > > Do you Yahoo!?
> > > Yahoo! Mail - 250MB free storage. Do more. Manage
> > less.
> > > http://info.mail.yahoo.com/mail_250
> > >
> > You don't. The server's internal representation of
> > dates is not something
> > you can modify.
> >
> > However, your _client_ may have many ways to format
> > date data for viewing.
> > How you change _what_you_see_ depends entirely on
> > which tool you are using
> > to get data from the server and present it for
> > viewing or other
> > operations. Refer to the documentation for the
> > client you are using for
> > details on how to get it to show you dates in the
> > format you want to see.
> >
> > Shawn Green
> > Database Administrator
> > Unimin Corporation - Spruce Pine
> >
>

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine
--=_alternative 005C39E485256FCE_=--