Re: date formatting for CC card expiration date check

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 18322
interpreted = N
texte = At 1:11 PM 6/18/98, Sandra L. Pitner wrote: >[date %m/%Y] gives 06/18/1998%m/%Y] >[date %m] gives 06/18/1998%m]Are you sure you don't have [date]%m/%y] in your template? >[format 2.0f][expmonth][/format] doesn't give 02, 03, etc., >need to add zero in front.Try [format .2d][expmonth][/format]It's not documented, but [format .(x)d] will pad the string to (x) number of characters wide with leading zeros. >There's probably many ways to attempt this, but the most obvious ones >don't work as I'd expect them to. > >[showif [date %m]>[expmonth]] >[hideif [date %Y]<[expyear]] > >Type logic would suit me fine, as would > >[hideif [date %m/%Y]<[format 2.0f][expmonth][/format]/[expyear]] > >but no such luck. Any suggestions? My default date setting in >preferences is the default one %m/%d/%Y.Try converting the dates into number of days since 00/00/0000 and then comparing those two numbers:[HideIf [math]{[expmonth]/01/[expyear]}[/math]>[math]{[date]}[/math]] -Daveo--------------- Dave MacLeay --+ o----------- Digital Frontier --+ o--- dave@digitalfrontier.com --+ Associated Messages, from the most recent to the oldest:

    
  1. Re: date formatting for CC card expiration date check (Rob Marquardt 1998)
  2. Re: date formatting for CC card expiration date check (Sandra L. Pitner 1998)
  3. Re: date formatting for CC card expiration date check (Sandra L. Pitner 1998)
  4. Re: date formatting for CC card expiration date check (John Hill 1998)
  5. Re: date formatting for CC card expiration date check (Sandra L. Pitner 1998)
  6. Re: date formatting for CC card expiration date check (Dave MacLeay 1998)
  7. date formatting for CC card expiration date check (Sandra L. Pitner 1998)
At 1:11 PM 6/18/98, Sandra L. Pitner wrote: >[date %m/%Y] gives 06/18/1998%m/%Y] >[date %m] gives 06/18/1998%m]Are you sure you don't have [date]%m/%y] in your template? >[format 2.0f][expmonth][/format] doesn't give 02, 03, etc., >need to add zero in front.Try [format .2d][expmonth][/format]It's not documented, but [format .(x)d] will pad the string to (x) number of characters wide with leading zeros. >There's probably many ways to attempt this, but the most obvious ones >don't work as I'd expect them to. > >[showif [date %m]>[expmonth]] >[hideif [date %Y]<[expyear]] > >Type logic would suit me fine, as would > >[hideif [date %m/%Y]<[format 2.0f][expmonth][/format]/[expyear]] > >but no such luck. Any suggestions? My default date setting in >preferences is the default one %m/%d/%Y.Try converting the dates into number of days since 00/00/0000 and then comparing those two numbers:[HideIf [math]{[expmonth]/01/[expyear]}[/math]>[math]{[date]}[/math]] -Daveo--------------- Dave MacLeay --+ o----------- Digital Frontier --+ o--- dave@digitalfrontier.com --+ Dave MacLeay

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:

Separate SSL Server (1997) Up-date for Webcatalog 2.0 (1998) Re:Signal Raised (1997) HideIf ip= OR ip (1998) Conditional searching & displaying (1997) How long does a cart last? (2002) Replacing entry (1998) RE: protect tag on NT (1997) remotely creating and populating a stock inventory db -almostthere! (1999) WebCat2 - Getting to the browser's username/password data (1997) Include vs. lookup? (1998) Don't tick me off :) [elaspedtime] (1997) Emailer tracking (1997) [Summary] re: Emailer setup (1997) can WC render sites out? (1997) webCatalog and Stocks (1998) Emailer setup (1997) HTTP Header info (1997) Password and Allow commands (1998) Interfacing a webcat front end registartion to CommunigatePRO (2000)