Re: Crazy dates (was: Re: sorting dates)
This WebDNA talk-list message is from 1999
It keeps the original formatting.
numero = 22465
interpreted = N
texte = >I just tried the examples you sent on my machine and they show up properly:>>730130>730130>544952>>My read date format is mdy and display preference is %m/%d/%Y. There is>something else wrong with your setup that is more fundamental I believe.>The number of days you're getting back is 12/31/1900. What platform are>you on and which version of WebCatalog?Mac and WC 3.0.1. Upgrading to 3.0.3 made this problem disappear. I haven'tseen any announcement of that release, so therefore wasn't the upgrade made.>I also tried changing the read date preference to dmy and ymd and modified>the dates appropriatly and the same (correct) numbers came up.Did work here, too. But I found out something I don't think I've seenbefore: I had to restart Web* for making the change to happen - setting thepreference wasn't enough.>John.>>>Until now I haven't paid much attention to this, since WebCat always has>>had problems with the date format we use in Sweden (YYYY-MM-DD). We have>>developed a few workarounds to avoid the problems, but it *is* clumsy to>>not beeing able to use our native way to write dates.>>>>When I saw the YYYY-MM-DD in the read date prefs I started to experiment,>>and it does not look good at all.>>>>Our prefs is set to date display format %m/%d/%Y and read date format to>>mdy.>>>>[math]{[date]}[/math] displays 694325>>[math]{01/11/1999}[/math] displays 694325>>[math]{01/11/1492}[/math] displays 694325>>>>as a matter of fact any date I enter displays 694325.>>>>I have also experimented to set date display format to %Y-%m-%d and read>>date format to ymd. It shows other figures, but not the right ones.>>>>Are we supposed to be able to both display and do [math] on YYYY-MM-DD dates?You didn't answer this one, but it seems to work with [math] on YYYY-MM-DDdates now, too (and this is really *GOOD* news to us, thanks!). The onlynon-working thing I have observed is that the result of such a calculationis still a US formatted date:[MATH date]{[DATE]}-{0000-00-11}[/MATH] displays 12/31/1998Date display format is set to %Y-%m-%d (and read date format to ymd) so IMOit should display 1998-12-31.>>>I seem to be having trouble with whole date fomrat thing.>>>>>>The prefrences is set to MM/DD/YYYY.>>>when I enter [date], I get 01/07/99>>>when I enter [math]{[date]}[/math] I get 694325>>>now this is supposed to be days since 00/00/0000 but 694325 days since>>>then is 1902, not 1999.>>>>>>theoritically this [math date]{[date]}-{03/00/0000}[/math] should give me>>>694295, but it gives me 11/30/0000.>>>>>>I'm kinda confused here.>>>>>>> >>[math date]{[date]}-{03/00/0000}[/math]>>>> >>>>> >I tried this and it returns 11/30/0000 no matter what I enter in the>>>> >03/00/000 field.>>>>>>>> OK, you need to be sure your date format is mdy for this specific code to>>>> work (open your WebCatalog Prefs file and see if ReadDateFormat has a>>>> value of mdy, which stands for month/day/year). ************************************************************* Christer Olsson Stora Nygatan 21 Phone +46 40 791 50 Ljusa Ideer AB S-211 37 Malmoe Fax +46 40 97 99 77 Sweden http://www.ljusaideer.se
Associated Messages, from the most recent to the oldest:
>I just tried the examples you sent on my machine and they show up properly:>>730130>730130>544952>>My read date format is mdy and display preference is %m/%d/%Y. There is>something else wrong with your setup that is more fundamental I believe.>The number of days you're getting back is 12/31/1900. What platform are>you on and which version of WebCatalog?Mac and WC 3.0.1. Upgrading to 3.0.3 made this problem disappear. I haven'tseen any announcement of that release, so therefore wasn't the upgrade made.>I also tried changing the read date preference to dmy and ymd and modified>the dates appropriatly and the same (correct) numbers came up.Did work here, too. But I found out something I don't think I've seenbefore: I had to restart Web* for making the change to happen - setting thepreference wasn't enough.>John.>>>Until now I haven't paid much attention to this, since WebCat always has>>had problems with the date format we use in Sweden (YYYY-MM-DD). We have>>developed a few workarounds to avoid the problems, but it *is* clumsy to>>not beeing able to use our native way to write dates.>>>>When I saw the YYYY-MM-DD in the read date prefs I started to experiment,>>and it does not look good at all.>>>>Our prefs is set to date display format %m/%d/%Y and read date format to>>mdy.>>>>
[math]{
[date]}[/math] displays 694325>>
[math]{01/11/1999}[/math] displays 694325>>
[math]{01/11/1492}[/math] displays 694325>>>>as a matter of fact any date I enter displays 694325.>>>>I have also experimented to set date display format to %Y-%m-%d and read>>date format to ymd. It shows other figures, but not the right ones.>>>>Are we supposed to be able to both display and do
[math] on YYYY-MM-DD dates?You didn't answer this one, but it seems to work with
[math] on YYYY-MM-DDdates now, too (and this is really *GOOD* news to us, thanks!). The onlynon-working thing I have observed is that the result of such a calculationis still a US formatted date:[MATH date]{
[date]}-{0000-00-11}[/MATH] displays 12/31/1998Date display format is set to %Y-%m-%d (and read date format to ymd) so IMOit should display 1998-12-31.>>>I seem to be having trouble with whole date fomrat thing.>>>>>>The prefrences is set to MM/DD/YYYY.>>>when I enter
[date], I get 01/07/99>>>when I enter
[math]{
[date]}[/math] I get 694325>>>now this is supposed to be days since 00/00/0000 but 694325 days since>>>then is 1902, not 1999.>>>>>>theoritically this [math date]{
[date]}-{03/00/0000}[/math] should give me>>>694295, but it gives me 11/30/0000.>>>>>>I'm kinda confused here.>>>>>>> >>[math date]{
[date]}-{03/00/0000}[/math]>>>> >>>>> >I tried this and it returns 11/30/0000 no matter what I enter in the>>>> >03/00/000 field.>>>>>>>> OK, you need to be sure your date format is mdy for this specific code to>>>> work (open your WebCatalog Prefs file and see if ReadDateFormat has a>>>> value of mdy, which stands for month/day/year). ************************************************************* Christer Olsson Stora Nygatan 21 Phone +46 40 791 50 Ljusa Ideer AB S-211 37 Malmoe Fax +46 40 97 99 77 Sweden http://www.ljusaideer.se
Christer Olsson
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:
checksum for credit cards? (1997)
[WebDNA] Downloadable file protection (2011)
send mail problem? (1997)
problems with 2 tags (1997)
listfiles-looking for slick solution (1997)
SERIAL NUMBER PROBLEM *AGAIN*!!! (1998)
suffix mapping for NT? (1997)
Shell Script needed (2003)
duplicate cart numbers (2002)
SSL and reg web*L and reg web* (1997)
RE: Problems with shopping cart (1997)
Search bug. Help (2002)
Re(4): Small Bug: ErrorLog.txt/[FORMVARIABLES]/[ORDERFILE] (1998)
Purchae error - Fixed to a degree (1997)
math on date? (1997)
Nested vs conditional (1997)
Interfacing a webcat front end registartion to CommunigatePRO (2000)
RFE: [include file=filename.inc&strip=t] (2002)
ShowNext Questions (2000)
Can't add a field (1998)