Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

hi im parsing a csv file with date(custom format), i have to parse the date given in anyformat(mm-dd-yyyy, yyyy/mm/dd , mmm dd yyyy) to a standard format dd/mm/yyyy.

The question is how can we find the format in which the date is given?

is there anyway to do it?

ps: i thinking of asking for the dateformat in the csv.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
156 views
Welcome To Ask or Share your Answers For Others

1 Answer

In your case, the string should contain just one of either "-" or "/" or " ", so you can dispatch based on that.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...