Skip to content
This repository was archived by the owner on Sep 29, 2024. It is now read-only.

DateTimeExtensions

Sascha Manns edited this page Sep 6, 2024 · 1 revision

ConvertDateToNumeric

This method converts DateTime to a purely numeric value in the format "yyyyMMdd". Example: 20240112

Usage

var dt = DateTime.Now;
var myInt = dt.ConvertDateToNumeric(dt);

ConvertDateTimeToString

This method converts the DateTime object to the format "yyyy-MM-dd HH:mm:ssZ"

var dt = DateTime.Now;
var myInt = dt.ConvertDateTimeToString(dt);

Clone this wiki locally