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:

Beta Documentation (1997) WebCat2: Found Items syntax, etc. (1997) Listfiles and nothing found (2001) Re[2]: 2nd WebCatalog2 Feature Request (1996) 2.0.1 new commands and contexts (1997) Setting up shop (1997) Listserver problem (1997) ShowNext (was New WebCatalog Site) (1997) [WebDNA] hide [DOS] command strings on resulting page (2016) WebCatalog2 Feature Feedback (1996) WebCat2b12 - nesting [tags] (1997) Configuring E-mail (1997) RE: pop up building with summarize (1998) BBEdit WedDNA Codeless Language Module (2004) WebCat2.0 acgi vs plugin (1997) Quiz question: Return all green and blank records? (2001) Difficult Alternating Problem (2001) WebCat2b12plugin - [search] is broken ... not! (1997) ampersand (1998) WebStar WebCat Crashing a lot (2004)