Enum DateFormat

DateFormat enumeration

Specifies the date format.

public enum DateFormat

Values

NameValueDescription
DateMmDdYyHhMmAM0The example: 09/30/02 13:00 PM
DateMmDdYy1The example: 9/30/02
DateMmmmDdYyyyHhMmAM2The example: September 30, 2002 13:00 PM
DateMmmmDdYyyy3The example: September 30, 2002
DateMmmDdHhMmAM4The example: Sep 30 13:00 PM
DateMmmDdYyy5The example: Sep 30, ‘02
DateMmmmDd6The example: September 30
DateMmmDd7The example: Sep 30
DateDddMmDdYyHhMmAM8The example: Tue 9/30/02 13:00 PM
DateDddMmDdYy9The example: Tue 9/30/02
DateDddMmmDdYyy10The example: Tue Sep 30, ‘02
DateDddHhMmAM11The example: Tue 13:00 PM
DateMmDd12The example: 9/30
DateDd13The example: 30
DateHhMmAm14The example: 13:00 PM
DateDddMmmDd15The example: Tue Sep 30
DateDddMmDd16The example: Tue 9/30
DateDddDd17The example: Tue 30
DateWwwDd18The example: W41/2
DateWwwDdYyHhMmAm19The example: W41/2/02 13:00 PM
DateMmDdYyyy20The example: 9/30/2002
Custom21DateTime values are formatted using format string which is set to the project’s CustomDateFormat property.
DateDdMmYyyy256The example: 19/07/2016
Default255The example: Default date format.

Examples

Shows how to customize date format of all dates in the project to be exported.

var project = new Project(DataDir + "CreateProject2.mpp");
project.Set(Prj.StartDate, new DateTime(2014, 9, 22));

// By default project.DateFormat == DateFormat.Date_ddd_mm_dd_yy (Mon 09/22/14) customize DateFormat (September 22, 2014)
project.Set(Prj.DateFormat, DateFormat.DateMmmmDdYyyy);
project.Save(OutDir + "CustomizeDateFormats1_out.pdf", SaveFileFormat.Pdf);

// Export to date format 19/07/2016
project.Set(Prj.DateFormat, DateFormat.DateDdMmYyyy);
project.Save(OutDir + "CustomizeDateFormats2_out.pdf", SaveFileFormat.Pdf);

See Also