Subject Re: date conversion for mysql
From Charlie <tm@tc.com>
Date Thu, 10 Jan 2019 22:58:29 -0500
Newsgroups dbase.getting-started

Hi Akshat... Thanks.. I will try that.  I am not using MariaDb though.  We will see!

Akshat Kapoor Wrote:

> On 10/01/2019 15:06, Charlie wrote:
> > Hi.. Is there an easy way to convert a date field to this format?
> >
> > It could be a character string result also.....
> >
> > yyyy-mm-dd
> >
> > I believe the dashes have to be there....
> >
> > Thanks much for any help!
> >
> It will depend upon which database you are using.
>
> With MariaDb I use dtos() and wrap it in quotes.
>
> "20190110" as part of sql statement works very well to represent the date.
>
> Give this a try. If it fails then you always have Mervyn's function.
>
> It is just a coincidence that I started using dtos() on Mervyn's
> suggestion. As the value returned is independent of the system date format.
>
> Regards
> Akshat