Re: How to fix date format?

2017-04-26 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, April 26, 2017 06:55:01 Suliman via Digitalmars-d-learn wrote: > Thanks! That's work! > > But why I can't do it in single line like: > string dt = > DateTime.toISOExtString(DateTime.fromSimpleString(point[1].coerce!string)) > ; "Error: function std.datetime.DateTime.toISOExtString ()

Re: How to fix date format?

2017-04-26 Thread Suliman via Digitalmars-d-learn
On Wednesday, 26 April 2017 at 05:21:32 UTC, Jonathan M Davis wrote: On Wednesday, April 26, 2017 04:02:12 Suliman via Digitalmars-d-learn wrote: I tried to do: writeln(DateTime.toISOExtString(DateTime.fromSimpleString(point[1].coerce! string))); But got error: Error: function

Re: How to fix date format?

2017-04-25 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, April 26, 2017 04:02:12 Suliman via Digitalmars-d-learn wrote: > I tried to do: > > writeln(DateTime.toISOExtString(DateTime.fromSimpleString(point[1].coerce! > string))); > > But got error: > > Error: function std.datetime.DateTime.toISOExtString () const is > not callable using

Re: How to fix date format?

2017-04-25 Thread Ali Çehreli via Digitalmars-d-learn
On 04/25/2017 10:41 AM, Suliman wrote: I am using mysql native. Date in DB have next format: 2016-11-01 06:19:37 But every tile when I am trying to get it I am getting such format: 2016-Oct-31 15:37:24 I use next code: writeln(point[1].coerce!string); Why coerce is forcing format changing?

Re: How to fix date format?

2017-04-25 Thread Suliman via Digitalmars-d-learn
I tried to do: writeln(DateTime.toISOExtString(DateTime.fromSimpleString(point[1].coerce!string))); But got error: Error: function std.datetime.DateTime.toISOExtString () const is not callable using argument types (DateTime) Error: function database.Database.getSingleTrackInfo no return exp;

Re: How to fix date format?

2017-04-25 Thread Suliman via Digitalmars-d-learn
On Tuesday, 25 April 2017 at 20:10:02 UTC, Jonathan M Davis wrote: On Tuesday, April 25, 2017 17:41:25 Suliman via Digitalmars-d-learn wrote: I am using mysql native. Date in DB have next format: 2016-11-01 06:19:37 But every tile when I am trying to get it I am getting such format:

Re: How to fix date format?

2017-04-25 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, April 25, 2017 17:41:25 Suliman via Digitalmars-d-learn wrote: > I am using mysql native. Date in DB have next format: 2016-11-01 > 06:19:37 > > But every tile when I am trying to get it I am getting such > format: > 2016-Oct-31 15:37:24 > > I use next code: >

How to fix date format?

2017-04-25 Thread Suliman via Digitalmars-d-learn
I am using mysql native. Date in DB have next format: 2016-11-01 06:19:37 But every tile when I am trying to get it I am getting such format: 2016-Oct-31 15:37:24 I use next code: writeln(point[1].coerce!string); Why coerce is forcing format changing? How I can extract result as without