Custom variable formatted as date

I’m making a template and I want to have a “happensDate” attribute for each page and I want to be able to work with it as with publishedDate, Date and unpublishedDate - basically what I need is formatting.
Is it somehow possible?
Thanks a lot,

I just found out you can use