i want to get a date in yyyy-MM-dd format from mysql which has a field type timestamp. docs suggest to use Date(field_name). however i achieved the result as i wanted in phpMyAdmin. The selected biew shos Date in the format i wanted. but when i try it from sails using sails-mysql adapter its giving time and zone also.
that is when i run query SELECT Date(field) FROM mytable i get the following results.
you can use mysql date format function like this
it will five you the exact format