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

Description

Gets a short form string representation of time portion.

Syntax

datetimeInstance.ShortTime

Arguments

None

Return value

ClassDescription
stringA short form string representation of time portion.

Sample code

1:

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

2:

string shortTime = dt.ShortTime; // In my environment, "4:13".

Notes

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

Links for reference

Copyright © Rice All rights reserved.