gendateaxis function

Generate a variable expressing time with its attributes for plotting