How to convert dd-mmm-yyyy (01-Jan-2009) to dd/mm/yy (01/01/09) using python functions.

Recommended Answers

All 4 Replies

Can you at least show us what you have tried?

Hint, module time is your friend. Use time.strptime(time_str, format_str) and then time.strftime(format_str, time_tuple).

The formatting directives are in the Python manual under time then strftime.

Sorry Friends! Mind was blocked and could not think. Took some time off and was able to find it. Thanks for your time.

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.