Tag Link | [Valid_Date] | Category | Utility |
---|---|---|---|
Type | Substitution | Source Available | No |
Support | Preferred | Version | 7.0 |
Change | Unchanged | Data Source | Any |
Output Type | Boolean | Security | None |
Implementation | LCAPI | Sets | Lasso 8.5, Lasso 8.0, Lasso 7.0 |
[Valid_Date] checks whether a string contains a valid date or not. The tag returns True if the parameter is in a format that Lasso can parse or False otherwise.
Built
If an optional
[If: (Valid_Date: '12/31/1987')] ... [/If]
[If: (Valid_Date: '1987-12-31')] ... [/If]
[If: (Valid_Date: '31|1987|12',
Required Parameters | |
---|---|
Date String | The date string to be inspected. |
Optional Parameters | |
-Format | Optional format to check the date string against. |
To check whether a tag is valid:
Use the [Valid_Date] tag. The following example tests several different dates to see if they are valid or not. Either True or False is returned for each test.
[Valid_Date: '12/25/2003']
[Valid_Date: 'Christmas']
[Valid_Date: '2003-12-25 1:35:35']
True
False
True