Is there any way to get rid of the time of day when using current_date
or sysdate
. I'm trying to only the store the date as YYYY-MM-DD
, but current_date is giving me YYYY-MM-DD HH:MM:SS:MS
Or when comparing the dates, it only compares the date and not the time would be just as good. Any help would be awesome, thanks.
Maybe you should try
trunc(sysdate)
function.
Rusty answered the part of your question regarding stripping the time portion. The part about incorporating the time when comparing dates is often done like this.
where YourDateField >= StartDate
and YourDateField < TheDayAfterEndDate
If you want to search on a specific date, StartDate and EndDate would be the same.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With