Home Notices Documents Classes Download Others Rice
Classes  >  datetime  >  ShortDate
datetime class : ShortDate getter

Description

Gets a short form string representation of date portion.

Syntax

datetimeInstance.ShortDate

Arguments

None

Return value

ClassDescription
stringA short form string representation of date portion.

Sample code

1:

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

2:

string shortDate = dt.ShortDate; // in my environment, "2016/03/04".

Notes

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

Links for reference

Copyright © Rice All rights reserved.