R
R
Roman Kuzmenko2017-06-18 10:58:22
MySQL
Roman Kuzmenko, 2017-06-18 10:58:22

How to select day from timestamp in mysql?

Hello!
How to correctly select a day from mysql timestamp, but so that the value is two-digit, for example 01.02,...11 , if you use day(mydate) it outputs in the format 1,2,3, etc.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
idShura, 2017-06-18
@devrvk

You can for example use DATE_FORMAT
select DATE_FORMAT('2017-06-03', '%d') from dual

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question