Check for StringtoDate
Moderators: chulett, rschirm, roy
Check for StringtoDate
How to check if StringtoDate converts successfully? The format being "yyyy-dd-mm". Thanks
Well, apply StringToDate() function in a stage variable. If its unsuccessful, the stage variable will have all stars or astrixs. You can test for that. Thats one of the ways. I am sure there are other ways, just wait for our experts to drop by.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 5
- Joined: Wed Feb 08, 2006 12:54 am
Re: Check for StringtoDate
you can use datefromdayssince to add the days which u given dateds_is_fun wrote:How to check if StringtoDate converts successfully? The format being "yyyy-dd-mm". Thanks
Try this.
Code: Select all
IsValid('date',StringToDate(date,'%yyyy-%dd-%mm'))