Toggle menu
876
3.8K
30.2K
279.1K
Catglobe Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

DateTime toJson: Difference between revisions

From Catglobe Wiki
Nguyenduyan (talk | contribs)
Created page with "== DateTime_toJson== Convert DateTime_class or DateTime array to string ==Syntax== DateTime_toJson(DateTime[, Type]) == Arguments == DateTime can be DateTime_class or DateTime array Type number: 0 for return full DateTime (default), 1 for return DateOnly, 2 for return TimeOnly == Return type == string of datetime, format yyyy-MM-ddThh:mm:ss.msZ == Examples == <source lang="javascript"> DateTime dateTime = new DateTime(); //array dateTime = getDateTime(); string..."
(No difference)

Revision as of 08:38, 3 April 2025

DateTime_toJson

Convert DateTime_class or DateTime array to string

Syntax

DateTime_toJson(DateTime[, Type])

Arguments

DateTime can be DateTime_class or DateTime array

Type number: 0 for return full DateTime (default), 1 for return DateOnly, 2 for return TimeOnly

Return type

string of datetime, format yyyy-MM-ddThh:mm:ss.msZ

Examples

DateTime dateTime = new DateTime();
//array dateTime = getDateTime();
string dtJson;
dtJson = DateTime_toJson(dateTime);//2024-12-30T08:22:23.9900000Z
dtJson = DateTime_toJson(dateTime, 1);//2024-12-30
dtJson = DateTime_toJson(dateTime, 2);//08:22:23.9900000