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) numberof 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 thencomparing 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:
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) numberof 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 thencomparing 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:
3RD POST Character limit in [Search]? (1998)
word count in HTML form textarea and linebreaks (2000)
text size limitation (1997)
Help! WebCat2 bug (1997)
Server IP address (2004)
Db crash in win98 (2000)
Preferred Web Design Tool? (1999)
Emailer (1997)
Notepad problems (1998)
Word search (1997)
[WebDNA] OT: FCKeditor (2008)
WebCatalog2 Feature Feedback (1996)
Re1000001: Setting up shop (1997)
Field name-subcategory (1997)
[LOOKUP] (1997)
Getting total number of items ordered (1997)
Search logic? (1998)
HELP WITH DATES (1997)
WC2.0 Memory Requirements (1997)
Attention SMSI - DOCS Error (2004)