Re: date formatting for CC card expiration date check

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 18325
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? > Yes, very sure. I was suprised at these results.> >>[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. > Thanks! Good to know.> > >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]] > > Works like a charm! Thank you very much! Sandy 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? > Yes, very sure. I was suprised at these results.> >>[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. > Thanks! Good to know.> > >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]] > > Works like a charm! Thank you very much! Sandy Sandra L. Pitner

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:

WebCat b13 CGI -shownext- (1997) [WebDNA] Encryptng a password (2016) Emailer (1997) [format] (1998) forming a SKU (1999) Signal Raised (1997) removing programming logic white space (2003) Generating Report Totals (1997) webcat page crashes MSIE 5 on mac (2000) WebCat2.0 [format thousands .0f] no go (1997) View Source from cache (1997) Thanks for tips, more quest (1997) blank page from template (1997) [AppendFile] problem (WebCat2b13 Mac .acgi) (1997) convertchars and e-mail (1998) WC2b15 - [HTMLx]...[/HTMLx] problems (1997) Webcatalog 4.0 - Storebuilder (2000) WebCat B13 Mac CGI -- Frames question (1997) WebCat2 - storing unformatted date data? (1997) flushdatabases (2000)