community
Q&A
All Questions
Ask a Question
Search by tag
Toggle navigation
community
Q&A
All Questions
Ask a Question
Search by tag
KB
Overview
Best Practices
Combining Data
Common Errors
Custom Elements
Data Sources
ITPilot
Installation & Updates
Northbound Connections
Operation
Performance & Optimization
Publishing
Scheduler
Security
VQL
USER MANUALS
Denodo Platform 8.0
Denodo Platform 7.0
Denodo Platform 6.0
Older Versions
VIDEOS
Featured
Data Combination
Data Services
Operation and Source Connectivity
Updates
Cloud
Solution Manager
TUTORIALS
Overview
Data Virtualization Basics
Data Services
Big Data
Agile BI
Web Automation
Workload Management
Data Discovery
Custom Components
EXPRESS
DRIVERS
Overview
JDBC
ODBC
FREE TRIAL
REGISTER
SIGN IN
Home
/
Q&A
/
Month integer to Month name
The original question and answers are in English. You are viewing a machine translation.
Click here to back to the original.
You can translate the question and the replies:
×
Tag too long
Month integer to Month name
I have a column with values of month numbers called "month" 01 02 03 I want the results to be of months name Jan Feb Mar, How to achieve this
formatdate
date
monthtext
monthinteger
user
30-08-2020 06:39:18 -0400
2 Answers
Hi, For this scenario, I would use the [CASE](https://community.denodo.com/docs/html/browse/7.0/vdp/vql/queries_select_statement/case_clause/case_clause) statement to get the values of months from number to name. **For example**, ``` select <months_field>, CASE WHEN <months_field>=1 THEN 'Jan' WHEN <months_field>=2 THEN 'Feb' ..... ..... END AS months from <view_name>; ``` I could also create a custom function that changes a field to your desired format. You can read more about how to create these *custom functions* in the [“Developing Custom Functions”](https://community.denodo.com/docs/html/browse/7.0/vdp/developer/developing_extensions/developing_custom_functions/developing_custom_functions) section of the Developer Guide and there are examples of custom functions located at **<DENODO_HOME>/samples/vdp/customFunctions**. Hope this helps!
Denodo Team
31-08-2020 07:49:55 -0400
Thank you for the response, but I was actually look for the different answer, I figured out the solution, may be this may help others `formatdate('MMM',to_timestamp('MM',12))` this will result in "**Dec**" Hope this helps
user
03-09-2020 04:59:32 -0400
ADD ANSWER
You must
sign in
to add an answer. If you do not have an account, you can
register here