datetime class : LongDate getter

Description

Gets a long form string representation of date portion.

Syntax

datetimeInstance.LongDate

Arguments

None

Return value

ClassDescription
stringA long form string representation of date portion.

Sample code

1:

datetime dt = new datetime(2016, 3, 4, 4, 13, 0);

2:

string longDate = dt.LongDate; // In my environment, "2016年3月4日".

Notes

It's a wrapper of the System.DateTime.ToLongDateString() method.

Links for reference

Copyright © Cooker All rights reserved.