| SQL simple -> | VBA FORMAT() time function |
|
|
VBA Format() function can be very usefull
for formating date-time values. It can be used as well for extracting date-time
parts aside well known functions like Date(),
Time(), Now()
in SQL query. Let see how we can order Colombo's employees according to their
birth days celebration sequence within one year. We passed following values as
a second parameter of the function: "q" - quater of the year (can be 1 to 4) "m" - month number (can be 1 to 12) "m" - day of the month number (can be 1 to 31)
The query returns following results:
We can write allso something like this in order to recive SQLserver like date format:
Getting:
|