Re: Crazy dates (was: Re: sorting dates)

This WebDNA talk-list message is from

1999


It keeps the original formatting.
numero = 22460
interpreted = N
texte = Well the dates seem to work only like it should, if you stick to the us formatting. However what you can do is when a user have to enter a date, you can let them do this by three popups, then afterward concatenating this text, into another format like the us date format.then when doing your math tag, you can use the format tag[format %Y-%m-%d][math]{[yourdate]}[/math][/format]That has worked out for me!/Martin >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? > >>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:

    
Well the dates seem to work only like it should, if you stick to the us formatting. However what you can do is when a user have to enter a date, you can let them do this by three popups, then afterward concatenating this text, into another format like the us date format.then when doing your math tag, you can use the format tag[format %Y-%m-%d][math]{[yourdate]}[/math][/format]That has worked out for me!/Martin >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? > >>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 Martin Bech

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:

international time (1997) Frames and WebCat (1997) Return records from another (1997) FlushDatabase Suggestion (1998) Re:Saving/Looking Up customer numbers (1998) Multiple SSL Keys (1998) Pithy questions on webcommerce & siteedit (1997) error count with $purchase (1997) 2.0.1 new commands and contexts (1997) shownext (1997) How do you TEAM Code? (2004) Calculating multiple shipping... (1997) Problem with ShoppingCart.tpl refresh (2000) 06/06/2000 bug warning ... (2000) WebCatalog for guestbook ? (1997) Repost: Orderfile, Grandtotal: How do I get it to all add up. (2000) WebCat2b13 Mac plugin - [sendmail] and checkboxes (1997) WebCat2b13MacPlugin - [math][date][/math] problem (1997) WebCat2b12 CGI Mac -- Problems propagating the cart through (1997) Snake Bites (1997)