Parse a Structured Date/Time String in Python

Logging information from data sheets can be time consuming and tedious. Furthermore, mistakes can occur when you must look line by line for the data that you need. When working with dates and time, this can mean missing an important deadline or setting a meeting for the improper time. To combat this, the following API will allow you to parse structured date/time information into separate objects, instantly. The only necessary input for this function is the raw date/time input and the relevant country code.

You can use this API by running this command to install the SDK:

Then, you can call the function:

# Configure API key authorization: Apikey
configuration = cloudmersive_validate_api_client.Configuration()
configuration.api_key['Apikey'] = 'YOUR_API_KEY'
# create an instance of the API class
api_instance = cloudmersive_validate_api_client.DateTimeApi(cloudmersive_validate_api_client.ApiClient(configuration))
input = cloudmersive_validate_api_client.DateTimeStandardizedParseRequest() # DateTimeStandardizedParseRequest | Input request
try:
# Parses a standardized date and time string into a date and time
api_response = api_instance.date_time_parse_standard_date_time(input)
pprint(api_response)
except ApiException as e:
print("Exception when calling DateTimeApi->date_time_parse_standard_date_time: %s\n" % e)

This will return each value as a separate object, that can then be categorized and logged appropriately in your systems. You can retrieve the API Key from the Cloudmersive website at no cost and with no commitment. This will provide you with 800 monthly calls across our library of APIs.

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store