You can provide an optional format string to indicate the format of x.The default format is DD-MON-YYYY or DD-MON-YY.