import re
from datetime import datetime


def transform_date(value):
    """Parse the given data value and return string expected by KMyMoney."""
    # zero pad the day of month number
    value = re.sub(r'^\d-', r'0\g<0>', value)
    return datetime.strptime(value, "%d-%b-%Y").strftime("%d %m %Y")