Re: Date fun with MySQL

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 58471
interpreted = N
texte = What's the error? Salvatore D'Anna DotNetNuke Hosting -----Original Message----- From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com] On Behalf Of Nitai @ ComputerOil Sent: Thursday, June 17, 2004 8:14 AM To: WebDNA Talk Subject: Re: Date fun with MySQL Question: Somehow this date_format gives me an erorr when doing joins: select bugs.id, DATE_FORMAT(bugs.mydate, '%d %m %Y'), users.user_name from bugs, users where bugs.bug_reporter = users.user_id order by bug_date, bug_time DESC I have looked online but could not find any answers. Nitai -- Redakto - Content Management that simply works Content Management & eBusiness Systems ComputerOilR AG Dammstrasse 7 5400 Baden / Switzerland Telefon +41 (0)844 44 55 66 info@computeroil.com http://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 > > 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: > > EXAMPLE > SELECT * FROM tbl_name WHERE date >= '2003-05-05'; > > > To display in different formats, tell MySQL to format the date when you do > your select statement and then it will show up nicely formatted (using > DATE_FORMAT) ... > > EXAMPLE > SELECT DATE_FORMAT(column_name, '%M %e %Y') FROM tbl_name; > > > > Salvatore D'Anna > DotNetNuke Hosting > > > -----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 > > Alain my man:-) > > I figured that saving them in native format will keep the DB save for other > applications. > > 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 :-) > > Is there any way to achieve this, like the good old [format] tag with MySql > date fields? > > Nitai > > -- > Redakto - Content Management that simply works > Content Management & eBusiness Systems > > ComputerOilR AG > Dammstrasse 7 > 5400 Baden / Switzerland > Telefon +41 (0)844 44 55 66 > > info@computeroil.com > http://computeroil.com > > > >> 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 >> >> I'd save them in native MySQL Date format. >> >> 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. >> >> 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. >> >> Alain >> >> On 17/06/2004, at 5:53 PM, Nitai @ ComputerOil wrote: >> >>> Hi guys, >>> >>> No one working with MySQL and WebDNA? I can't ask that question no >>> where >>> else, since no one knnows WebDNA .......... >>> >>> Nitai >> >> >> >> ------------------------------------------------------------- >> 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/ >> > > > > > ------------------------------------------------------------- > 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/ > > __________ NOD32 1.789 (20040614) Information __________ > > This message was checked by NOD32 Antivirus System. > http://www.nod32.com > > > > ------------------------------------------------------------- > 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/ > ------------------------------------------------------------- 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/ __________ NOD32 1.789 (20040614) Information __________ This message was checked by NOD32 Antivirus System. http://www.nod32.com ------------------------------------------------------------- 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:

    
  1. Re: Date fun with MySQL ( "Nitai @ ComputerOil" 2004)
  2. Re: Date fun with MySQL ( Gary Krockover 2004)
  3. Re: Date fun with MySQL ( "Nitai @ ComputerOil" 2004)
  4. Re: Date fun with MySQL ( Gary Krockover 2004)
  5. Re: Date fun with MySQL ( "Nitai @ ComputerOil" 2004)
  6. Re: Date fun with MySQL ( "Sal D'Anna" 2004)
  7. Re: Date fun with MySQL ( "Nitai @ ComputerOil" 2004)
  8. Re: Date fun with MySQL ( "Sal D'Anna" 2004)
  9. Re: Date fun with MySQL ( "Nitai @ ComputerOil" 2004)
  10. Re: Date fun with MySQL ( "Nitai @ ComputerOil" 2004)
  11. Re: Date fun with MySQL ( "Sal D'Anna" 2004)
  12. Re: Date fun with MySQL ( "Nitai @ ComputerOil" 2004)
  13. Re: Date fun with MySQL ( eLists 2004)
  14. Re: Date fun with MySQL ( "Nitai @ ComputerOil" 2004)
  15. Re: Date fun with MySQL ( Alain Russell 2004)
  16. Re: Date fun with MySQL ( "Nitai @ ComputerOil" 2004)
  17. Date fun with MySQL ( "Nitai @ ComputerOil" 2004)
What's the error? Salvatore D'Anna DotNetNuke Hosting -----Original Message----- From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com] On Behalf Of Nitai @ ComputerOil Sent: Thursday, June 17, 2004 8:14 AM To: WebDNA Talk Subject: Re: Date fun with MySQL Question: Somehow this date_format gives me an erorr when doing joins: select bugs.id, DATE_FORMAT(bugs.mydate, '%d %m %Y'), users.user_name from bugs, users where bugs.bug_reporter = users.user_id order by bug_date, bug_time DESC I have looked online but could not find any answers. Nitai -- Redakto - Content Management that simply works Content Management & eBusiness Systems ComputerOilR AG Dammstrasse 7 5400 Baden / Switzerland Telefon +41 (0)844 44 55 66 info@computeroil.com http://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 > > 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: > > EXAMPLE > SELECT * FROM tbl_name WHERE date >= '2003-05-05'; > > > To display in different formats, tell MySQL to format the date when you do > your select statement and then it will show up nicely formatted (using > DATE_FORMAT) ... > > EXAMPLE > SELECT DATE_FORMAT(column_name, '%M %e %Y') FROM tbl_name; > > > > Salvatore D'Anna > DotNetNuke Hosting > > > -----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 > > Alain my man:-) > > I figured that saving them in native format will keep the DB save for other > applications. > > 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 :-) > > Is there any way to achieve this, like the good old [format] tag with MySql > date fields? > > Nitai > > -- > Redakto - Content Management that simply works > Content Management & eBusiness Systems > > ComputerOilR AG > Dammstrasse 7 > 5400 Baden / Switzerland > Telefon +41 (0)844 44 55 66 > > info@computeroil.com > http://computeroil.com > > > >> 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 >> >> I'd save them in native MySQL Date format. >> >> 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. >> >> 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. >> >> Alain >> >> On 17/06/2004, at 5:53 PM, Nitai @ ComputerOil wrote: >> >>> Hi guys, >>> >>> No one working with MySQL and WebDNA? I can't ask that question no >>> where >>> else, since no one knnows WebDNA .......... >>> >>> Nitai >> >> >> >> ------------------------------------------------------------- >> 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/ >> > > > > > ------------------------------------------------------------- > 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/ > > __________ NOD32 1.789 (20040614) Information __________ > > This message was checked by NOD32 Antivirus System. > http://www.nod32.com > > > > ------------------------------------------------------------- > 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/ > ------------------------------------------------------------- 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/ __________ NOD32 1.789 (20040614) Information __________ This message was checked by NOD32 Antivirus System. http://www.nod32.com ------------------------------------------------------------- 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/ "Sal D'Anna"

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:

taxRate is fine but taxTotal isn't (1997) Was 5.0 Pricing, now Sandbox versus Website and ruminating (2003) NetForms for mail, sorry (1998) weird happenings (1997) New WebDNA Forum Solution (in development) (2003) Internet Explorer and caching (2000) frames & carts (1997) Text in coloums... (2000) tcpconnect/tcpsend frustrations (2002) WebStar quitting since upgrading to WC4 (2000) Netscape Communicator 4 (1997) Emailer 1.01 bombs (1997) Sum of [founditems] ? (2004) It gets better... posting problems + Webcat 3.0.7 available - did anyone know? (2000) Session Number (1998) Separate SSL Server (1997) Webstar 1.3.1 PPC (1997) WebCat2b13MacPlugIn - [shownext method=post] ??? (1997) Big Databases (1997) shipping calculations, lookup command (1997)