Re: [date] formatting bug inside [orderfile]?
This WebDNA talk-list message is from 1998
It keeps the original formatting.
numero = 16842
interpreted = N
texte = On 3/31/1998 7:29 PM, PCS Technical Support so noted...>>outside the orderfile, date is 03/31/1998 and formatted is 03/31/98>>inside the orderfile, date is 03/31/1998 and formatted is>>03/31/1998%m/%d/%y]>>>>A bug? A problem? Should I be setting this up differently? For the time>>being, I'll be setting the formatted date/time *outside* the [orderfile]>>and assigning it to a cart header for use inside -- but there must be a>>better way.>>In the context of an [OrderFile], the tag [date] refers to the header>variable date in the order file, essentially no different than something>like [header5]. So the symptom you're seeing is analogous to the>(incorrect) [header5 %m/%d/%y] which makes no sense to WebCatalog.>>Outside the context of an [OrderFile], [date] refers to today's date from>the server's clock.>>So you'd have to use the [Format] context to force the date into a>different format:>>[Format Days_To_Date %m/%d/%y][math]{[date]}[/math][/Format]>>The Math context converts the orderfile date to the number of days since>00/00/0000, and then the Format context converts that number to a formatted>date of your choosing.Ouch! Now I can see *why* it's doing it, but I think I'll still pass in the date from outside through a header field (since I also need to be accessing the current time, not the time the orderfile was created). I know it would probably mess up some existing sites that use the variable, but it would be nice if they were called something like orderDate and orderTime to keep them distinct. FYI, the portion of the manual that lists the header tags for the [OrderFile] context makes no mention of [date] and [time]. In the very back, under Shopping cart/order file format, the tags are shown, but not explained -- in addition to a number of other mystery tags, [CartIPAddress] [CartUsername] [CartPassword] [Precision] [TaxableShipping] [AuthNumber] [ResponseText] [Status] [BatchNumber] [ReferenceNumber] [SequenceNumber] [ItemNumber], which I imagine are primarily WebMerchant, but would be nice to have more of an explanation of, especially [CartUsername] and [CartPassword] which I think a few other people on the list are looking for additional data on as well.With [Format Days_To_Date %m/%d/%y], is Days_To_Date a math variable I'm creating, or a function of the [format] tag? I could find no mention of that either.Rob MarquardtDesigner/Resident WireheadToast Design300 First Avenue North, Suite 150Minneapolis MN 55401612.330.9863 v612.321.9424 fwww.toastdesign.com
Associated Messages, from the most recent to the oldest:
On 3/31/1998 7:29 PM, PCS Technical Support so noted...>>outside the orderfile, date is 03/31/1998 and formatted is 03/31/98>>inside the orderfile, date is 03/31/1998 and formatted is>>03/31/1998%m/%d/%y]>>>>A bug? A problem? Should I be setting this up differently? For the time>>being, I'll be setting the formatted date/time *outside* the
[orderfile]>>and assigning it to a cart header for use inside -- but there must be a>>better way.>>In the context of an
[orderfile], the tag
[date] refers to the header>variable date in the
order file, essentially no different than something>like [header5]. So the symptom you're seeing is analogous to the>(incorrect) [header5 %m/%d/%y] which makes no sense to WebCatalog.>>Outside the context of an
[orderfile],
[date] refers to today's date from>the server's clock.>>So you'd have to use the
[format] context to force the date into a>different format:>>[Format Days_To_Date %m/%d/%y]
[math]{
[date]}[/math][/Format]>>The Math context converts the orderfile date to the number of days since>00/00/0000, and then the Format context converts that number to a formatted>date of your choosing.Ouch! Now I can see *why* it's doing it, but I think I'll still pass in the date from outside through a header field (since I also need to be accessing the current time, not the time the orderfile was created). I know it would probably mess up some existing sites that use the variable, but it would be nice if they were called something like orderDate and orderTime to keep them distinct. FYI, the portion of the manual that lists the header tags for the
[orderfile] context makes no mention of
[date] and
[time]. In the very back, under Shopping cart/
order file format, the tags are shown, but not explained -- in addition to a number of other mystery tags, [CartIPAddress] [CartUsername] [CartPassword] [Precision] [TaxableShipping] [AuthNumber] [ResponseText] [Status] [BatchNumber] [ReferenceNumber] [SequenceNumber] [ItemNumber], which I imagine are primarily WebMerchant, but would be nice to have more of an explanation of, especially [CartUsername] and [CartPassword] which I think a few other people on the list are looking for additional data on as well.With [Format Days_To_Date %m/%d/%y], is Days_To_Date a math variable I'm creating, or a function of the
[format] tag? I could find no mention of that either.Rob MarquardtDesigner/Resident WireheadToast Design300 First Avenue North, Suite 150Minneapolis MN 55401612.330.9863 v612.321.9424 fwww.toastdesign.com
Rob Marquardt
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:
New WebMerchant/Mac beta available (1997)
CSS and SSI books (2004)
[WriteFile] problems (1997)
WC Database Format (1997)
OT: SEO (2007)
Interpret Around Contexts? (2000)
Max Record length (1997)
RequiredFields notes ... (1997)
WebCat2 - Getting to the browser's username/password data (1997)
Tax Laws for Online Sales (2003)
Protect and Serve (1999)
Summing fields (1997)
Help (1999)
Date Calulation (1997)
WebCat2b12--[searchstring] bug (1997)
Calculating multiple shipping... (1997)
Help! WebCat2 bug (1997)
Opening 'order file'. (1999)
WC 2.0 frames feature (1997)
Field names beginning with Reg.. (2002)