Great. How can we use this function? For instance, we can use it to change the way dates are shown. Take a look:
EXTRACT(DAY FROM launched) ||
EXTRACT(MONTH FROM launched) ||
EXTRACT(YEAR FROM launched)
As a result, we'll get dates like
'10-03-2012' instead of
'2012-03-10'. But the query itself… Ugh… this doesn't look very nice.
This is why various databases implement new functions to work with time and date. These functions make such operations easier. However, there is no universal way which would work across most databases. This is why we won't show any of them here.