Need to convert a TimeStamp column value to Simple Date Format
Current Q: ============================================================================= Need to convert a TimeStamp column value to Simple Date Format.
I have a column in the database which is in time stamp format. And the date I am passing through parameter is:
EXTRACT_FROM_DT = Get it from some database table; OR EXTRACT_FROM_DT = CURRENT_DATE -7
So in both cases EXTRACT_FROM_DT which will be passed as parameter to where caluse of a SQL which is then compared to Timestamp column. ============================================================================= Current Q END: =============================================================================
This question is some what related to my last question. so I am gonna mention it here.
============================================================================= Last Q: ========================================================================== I need an SQL Function that gets me the 2nd Saturday of the month.
if (Function (CURRENT_DATE) DAY) = 'SATURDAY' --Here I want the 2nd saturday then EXTRACT_FROM_DT = Get it from some database table; else EXTRACT_FROM_DT = CURRENT_DATE -7 fi ============================================================================= Last Q END: ===========================================================================
If you are joedsilva Plz read below :-) (I am sure joedsilva your are gonna reply. So Thanks in advance.)
Re: Need to convert a TimeStamp column value to Simple Date Format
Bob has already given you the answer, except that I think week_of_month doesn't really get you to second Saturday because week_of_month is zero for the first partial week. The better approach is to use weekday_of_month = 2 as jgerstb mentioned in the other thread.