Subject Re: date conversion for mysql
From Akshat Kapoor <akshat.kapoor@kapoorsons.in>
Date Thu, 10 Jan 2019 18:52:25 +0530
Newsgroups dbase.getting-started

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