Generate date string in layout