Sub dateFormat3() Dim datDateTime As Date datDateTime = #11/30/1998 10:54:17 AM# Debug.Print datDateTime Debug.Print format(datDateTime, "yyyy-mm-dd")End Sub