Formatted date

Steven Schveighoffer schveiguy at gmail.com
Wed Mar 22 17:53:39 UTC 2023


On 3/22/23 10:02 AM, Alexander Zhirov wrote:
> Tell me, how can I use such a date conversion mechanism? I didn't find 
> [something](https://www.php.net/manual/en/datetime.format.php) similar 
> on the forum.
> 
> Convert date from received time
> 
> ```
> Clock.currTime().toSimpleString()
> ```
> 
> So that i can get a more readable look:
> 
> `2023-Mar-22 16:53:42.2507395` => `2023.03.22 16:53:42`

D's datetime intentionally does not tackle formatting -- it's a huge 
undertaking.

There is an option on code.dlang.org: 
https://code.dlang.org/packages/datefmt

-Steve


More information about the Digitalmars-d-learn mailing list