First try on the date function