Implemented factorial and date_trunc
trying to change dates to sql dates