I retrieve timestamp type data from the mysql table. but I just need to return only the date part of this timestamp. Tried in convering timestamp to a date data type. But in jooq this gives some errors.Here is what I retrieve
Field<Timestamp> transaction_date = LINKLK_TRANSACTIONS.MODIFIED_AT.as("transaction_date");
This cannot work:
All you're doing is renaming your column to a different name that happens to contain the name "date". You have to use MySQL's
date()
function, for instanceOr you can cast your
Field
:There are many other options to do the same, but the above will be sufficient for your particular use-case.