Re: Date fun with MySQL

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 58469
interpreted = N
texte = Wow, great. Did not think of letting MySQL format my date. Thank you. Nitai -- Redakto - Content Management that simply works Content Management & eBusiness Systems ComputerOil=AE 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 >=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:

    
  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)
Wow, great. Did not think of letting MySQL format my date. Thank you. Nitai -- Redakto - Content Management that simply works Content Management & eBusiness Systems ComputerOil=AE 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 >=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:

emailer setup (1997) back button loses cart (2000) Ok here is a question? (1997) Comments in db? (1997) I'm new be kind (1997) Urgent Help needed (1998) More on the email templates (I like it) (1997) Secure Server (1997) dates and hex formatting (1997) [WebDNA] issues posted by sgbc (2011) [Sum] function? (1997) WebMerchant? (1998) Applescript, WebDNA, and PDF (1997) shownext problems (1998) Whats going on with my SERIAL NUMBER??? (1998) case number with spaces. (2000) numfound question (2005) WebCat2b13MacPlugIn - [showif][search][/showif] (1997) [format xs] freeze (1997) Moment of Thanks (1997)