Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To obtain the month in the form of MMM in a Hive script, you can use the date_format function. Here is an example:

SELECT dateformat(datecolumn, 'MMM') as monthformatted FROM tablename;

In this example, replace "datecolumn" with the name of the column containing the date information and "tablename" with the name of the table containing the data. This script will output the month in the format of "Jan", "Feb", "Mar", etc.