Re: Date fun with MySQL
This WebDNA talk-list message is from 2004
It keeps the original formatting.
numero = 58470
interpreted = N
texte = Question:Somehow this date_format gives me an erorr when doing joins:select bugs.id, DATE_FORMAT(bugs.mydate, '%d %m %Y'), users.user_namefrom bugs, userswhere bugs.bug_reporter =3D users.user_idorder by bug_date, bug_time DESCI have looked online but could not find any answers.Nitai--Redakto - Content Management that simply worksContent Management & eBusiness SystemsComputerOil=AE AGDammstrasse 75400 Baden / SwitzerlandTelefon +41 (0)844 44 55 66info@computeroil.comhttp://computeroil.com> From: Sal D'Anna
> Reply-To: WebDNA Talk > Date: Thu, 17 Jun 2004 07:37:37 -0700> To: WebDNA Talk > Subject: Re: Date fun with MySQL>=20> The format of a DATE value is 'YYYY-MM-DD'. According to standard SQL, no> other format is allowed. You should use this format in UPDATE expressions> and in the WHERE clause of SELECT statements. For example:>=20> EXAMPLE> SELECT * FROM tbl_name WHERE date >=3D '2003-05-05';>=20>=20> To display in different formats, tell MySQL to format the date when you d=o> your select statement and then it will show up nicely formatted (using> DATE_FORMAT) ...>=20> EXAMPLE> SELECT DATE_FORMAT(column_name, '%M %e %Y') FROM tbl_name;>=20>=20>=20> Salvatore D'Anna> DotNetNuke Hosting>=20>=20> -----Original Message-----> From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com] On Behalf Of> Nitai @ ComputerOil> Sent: Thursday, June 17, 2004 2:39 AM> To: WebDNA Talk> Subject: Re: Date fun with MySQL>=20> Alain my man:-)>=20> I figured that saving them in native format will keep the DB save for oth=er> applications.>=20> But what about if we need to show them in other formats. Each of my hosts> want to have different date formats. No I am not using sandboxes :-)>=20> Is there any way to achieve this, like the good old [format] tag with MyS=ql> date fields?>=20> Nitai>=20> --> Redakto - Content Management that simply works> Content Management & eBusiness Systems>=20> ComputerOilR AG> Dammstrasse 7> 5400 Baden / Switzerland> Telefon +41 (0)844 44 55 66>=20> info@computeroil.com> http://computeroil.com>=20>=20>=20>> From: Alain Russell >> Reply-To: WebDNA Talk >> Date: Thu, 17 Jun 2004 21:28:15 +1200>> To: WebDNA Talk >> Subject: Re: Date fun with MySQL>>=20>> I'd save them in native MySQL Date format.>>=20>> They will then be fast for searching and I'm guessing at a later date>> SMSI will add a function to read/change dates from MySQL format to>> WebDNA format as an option.>>=20>> As well you will be able to access the database with other applications>> (PHP) that will not need to many workarounds to read/write the date.>>=20>> Alain>>=20>> On 17/06/2004, at 5:53 PM, Nitai @ ComputerOil wrote:>>=20>>> Hi guys,>>>=20>>> No one working with MySQL and WebDNA? I can't ask that question no>>> where>>> else, since no one knnows WebDNA ..........>>>=20>>> Nitai>>=20>>=20>>=20>> ------------------------------------------------------------->> This message is sent to you because you are subscribed to>> the mailing list .>> To unsubscribe, E-mail to: >> To switch to the DIGEST mode, E-mail to>> >> Web Archive of this list is at: http://webdna.smithmicro.com/>>=20>=20>=20>=20>=20> -------------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to> > Web Archive of this list is at: http://webdna.smithmicro.com/>=20> __________ NOD32 1.789 (20040614) Information __________>=20> This message was checked by NOD32 Antivirus System.> http://www.nod32.com>=20>=20>=20> -------------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to> > Web Archive of this list is at: http://webdna.smithmicro.com/>=20-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Question:Somehow this date_format gives me an erorr when doing joins:select bugs.id, DATE_FORMAT(bugs.mydate, '%d %m %Y'), users.user_namefrom bugs, userswhere bugs.bug_reporter =3D users.user_idorder by bug_date, bug_time DESCI have looked online but could not find any answers.Nitai--Redakto - Content Management that simply worksContent Management & eBusiness SystemsComputerOil=AE AGDammstrasse 75400 Baden / SwitzerlandTelefon +41 (0)844 44 55 66info@computeroil.comhttp://computeroil.com> From: Sal D'Anna > Reply-To: WebDNA Talk > Date: Thu, 17 Jun 2004 07:37:37 -0700> To: WebDNA Talk > Subject: Re: Date fun with MySQL>=20> The format of a DATE value is 'YYYY-MM-DD'. According to standard SQL, no> other format is allowed. You should use this format in UPDATE expressions> and in the WHERE clause of SELECT statements. For example:>=20> EXAMPLE> SELECT * FROM tbl_name WHERE date >=3D '2003-05-05';>=20>=20> To display in different formats, tell MySQL to format the date when you d=o> your select statement and then it will show up nicely formatted (using> DATE_FORMAT) ...>=20> EXAMPLE> SELECT DATE_FORMAT(column_name, '%M %e %Y') FROM tbl_name;>=20>=20>=20> Salvatore D'Anna> DotNetNuke Hosting>=20>=20> -----Original Message-----> From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com] On Behalf Of> Nitai @ ComputerOil> Sent: Thursday, June 17, 2004 2:39 AM> To: WebDNA Talk> Subject: Re: Date fun with MySQL>=20> Alain my man:-)>=20> I figured that saving them in native format will keep the DB save for oth=er> applications.>=20> But what about if we need to show them in other formats. Each of my hosts> want to have different date formats. No I am not using sandboxes :-)>=20> Is there any way to achieve this, like the good old [format] tag with MyS=ql> date fields?>=20> Nitai>=20> --> Redakto - Content Management that simply works> Content Management & eBusiness Systems>=20> ComputerOilR AG> Dammstrasse 7> 5400 Baden / Switzerland> Telefon +41 (0)844 44 55 66>=20> info@computeroil.com> http://computeroil.com>=20>=20>=20>> From: Alain Russell >> Reply-To: WebDNA Talk >> Date: Thu, 17 Jun 2004 21:28:15 +1200>> To: WebDNA Talk >> Subject: Re: Date fun with MySQL>>=20>> I'd save them in native MySQL Date format.>>=20>> They will then be fast for searching and I'm guessing at a later date>> SMSI will add a function to read/change dates from MySQL format to>> WebDNA format as an option.>>=20>> As well you will be able to access the database with other applications>> (PHP) that will not need to many workarounds to read/write the date.>>=20>> Alain>>=20>> On 17/06/2004, at 5:53 PM, Nitai @ ComputerOil wrote:>>=20>>> Hi guys,>>>=20>>> No one working with MySQL and WebDNA? I can't ask that question no>>> where>>> else, since no one knnows WebDNA ..........>>>=20>>> Nitai>>=20>>=20>>=20>> ------------------------------------------------------------->> This message is sent to you because you are subscribed to>> the mailing list .>> To unsubscribe, E-mail to: >> To switch to the DIGEST mode, E-mail to>> >> Web Archive of this list is at: http://webdna.smithmicro.com/>>=20>=20>=20>=20>=20> -------------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to> > Web Archive of this list is at: http://webdna.smithmicro.com/>=20> __________ NOD32 1.789 (20040614) Information __________>=20> This message was checked by NOD32 Antivirus System.> http://www.nod32.com>=20>=20>=20> -------------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to> > Web Archive of this list is at: http://webdna.smithmicro.com/>=20-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
"Nitai @ ComputerOil"
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
# fields limited? (1997)
Anyone using [sendmail] for HTML encoded mail? (2000)
transferring values (1998)
Encrypt/Decrypt (2008)
Re:Finding max value for a field (1997)
Download (1999)
Maximum characters in header? (1999)
WebCat2final1 crashes (1997)
listfiles-looking for slick solution (1997)
Nesting FoundItem Context (1997)
Quiz question: Return all green and blank records? (2001)
[include ...] behavior (1997)
WebCatalog2 Feature Feedback (1996)
Calculating multiple shipping... (1997)
auto enter dates (1998)
Problem: 3.0 doesn't update carts (1997)
Orders coming up blank (2004)
search zip codes ranges (2003)
TCPconnect issue (2000)
Its not that weird. (1997)