Re: [WebDNA] Dates
This WebDNA talk-list message is from 2009
It keeps the original formatting.
numero = 103766
interpreted = N
texte = Donovan Brooke wrote:> Then do some math:> > 2 days from now: [math date]{[date]}+{02/00/0000}[/math]I'm afraid I still can't get it to work. That is, your code does give 10/10/2009 but adding four days gives 10/12/2009.Here's the modified example and a few other date calculations:http://www.musicaviva.com/test/dates.htmlIt seems the [math date] tag does do the calculation correctly but the output is in U.S. date format no matter how the WebDNA preferences are set.Also, the [math]{...}[/math] syntax *always* treats whatever's inside the {} as U.S. format date.For example, [Math]{07/10/2009}[/Math] gives 733963 while [Math]{07/10/2009}[/Math] gives 733994 (unless I'm mistaken, it should be 734053 and 734054 respectively)Even worse, [Math]{[DATE]}[/Math] gives 733994, in other words, it reads today's date as 08/10/2009 (8th of October) but *treats* it as 10th of August!That being said, I'm only 95 percent sure the server's preferences are set to dd/mm/yyyy date format. Could that be the cause of the problems?(Unfortunately I don't have access to the server prefs myself, had to ask somebody - who *told* me they'd changed it to international format a couple of weeks ago - to doublecheck and I haven't received a reply yet. Maybe the problem's been fixed before anybody but me gets to see the demo page I made ;-)---> Yep. :-/ This is a bug in the admin templates. Thanks for bring> it to light to the list. Until we release a new> version, you can edit the file /WebCatalogEngine/admin/AdminPrefs.dna> lines 189 and 190.. just switch the "yes" and "no" at the end of those> lines.OK. No big deal then, as long as we know about it. :-)Frank
Associated Messages, from the most recent to the oldest:
Donovan Brooke wrote:> Then do some math:> > 2 days from now: [math date]{
[date]}+{02/00/0000}[/math]I'm afraid I still can't get it to work. That is, your code does give 10/10/2009 but adding four days gives 10/12/2009.Here's the modified example and a few other date calculations:http://www.musicaviva.com/test/dates.htmlIt seems the [math date] tag does do the calculation correctly but the output is in U.S. date format no matter how the WebDNA preferences are set.Also, the
[math]{...}[/math] syntax *always* treats whatever's inside the {} as U.S. format date.For example,
[math]{07/10/2009}[/Math] gives 733963 while
[math]{07/10/2009}[/Math] gives 733994 (unless I'm mistaken, it should be 734053 and 734054 respectively)Even worse,
[math]{
[date]}[/Math] gives 733994, in other words, it reads today's date as 08/10/2009 (8th of October) but *treats* it as 10th of August!That being said, I'm only 95 percent sure the server's preferences are set to dd/mm/yyyy date format. Could that be the cause of the problems?(Unfortunately I don't have access to the server prefs myself, had to ask somebody - who *told* me they'd changed it to international format a couple of weeks ago - to doublecheck and I haven't received a reply yet. Maybe the problem's been fixed before anybody but me gets to see the demo page I made ;-)---> Yep. :-/ This is a bug in the admin templates. Thanks for bring> it to light to the list. Until we release a new> version, you can edit the file /WebCatalogEngine/admin/AdminPrefs.dna> lines 189 and 190.. just switch the "yes" and "no" at the end of those> lines.OK. No big deal then, as long as we know about it. :-)Frank
Frank Nordberg
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:
help on brickwalls (2003)
[WebDNA] Admin Login Required to Serve any TPL Page (2009)
BW in a search (2007)
WebCatalog/WebMerchant Manuals Available (1998)
Missing Cart Information (2003)
emailer 150 (1997)
Need help with emailer- 2 issues (1997)
Can't Update records (1997)
email program problem (1998)
Sort Floating Point Number (2008)
shipping confusion (2000)
Almost a there but..bye bye NetCloak (1997)
OT : Site speed feedback (2002)
Cart # Starting at 1000 (2000)
Execute Applescript (1997)
Emailer 1.01 bombs (1997)
wo search help (1999)
dos command not working the same as does at prompt? (1998)
Hard Questions ? (1997)
Not reading blanks (1998)