Skip to content
Advertisement

Tag: date

MONTHNAME in Portuguese MYSQL

I´ve got a huge query (In a PHP file) that gives me a monthname from some dates: Is there a way to insert my language inline with MONTHANAME? Something like: I don´t want to write case for eveymonth to transform ‘Dec’ to ‘Dez’ and so on, this will take too long. Answer Unfortunately in MySQL this cannot be done dynamically

Send mail every N days in SQL

I need to send a warning mail 14 days before certificates valid_to date ends and also send email every 3 days from delay_days. Table Certificates consists of: ID(int) | cert_valid_to(date) | …

How to find previous date in HIVE

I want to find previous date in Hive. For example : I have Date as 20180821 (yyyyMMdd) format, I want to find previous date of this in Hive. I tried date_sub() function, seems it works only with yyyy-MM-dd format. How to solve my issue. Please help Answer In addition to already provided solution with unix_timestamp conversion, please consider also this.

SQL Month YTD and prior YTD data

I am trying to write a query to return Month-To-Date data for the Current Year, and also the Previous Year. Meaning I need data from 2017-07-01 to 2017-07-26 and also 2016-07-01 to 2016-07-26. However, my query currently returns data from 2017-07-01 to 2017-07-26 (correctly) but also returns data from 2016-07-01 to 2016-07-31 (incorrectly). How can I have the data for

Advertisement