Hi, We have a date input come in the format of YYYYMMDD,
ex: if the date comes as 19980224, then its good
else if the date comes as 19982402, then we need to raise exception
we need to validate this date format. can you please guide me how to do this?
kuchi
0
Newbie Poster
Recommended Answers
Jump to PostOne hint.
import time date = 19980224 print time.strptime(date, '%Y%m%d') date = 19982402 print time.strptime(date, '%Y%m%d')
Cheers and Happy coding
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.