Convert numeric date to text

michele_adamski
michele_adamski Altair Community Member
edited March 2023 in Community Q&A

I have a report that I've pulled from a SQL database that creates a column with the numeric date and time something was created. 

I've split that column so that I get only Year and Month. 

Is there any way to convert the Month to text? In other words, "July" instead of "7". 

Thanks!

image

Tagged:

Welcome!

It looks like you're new here. Sign in or register to get started.

Answers

  • Lasse
    Lasse Altair Community Member
    edited March 2023

    Hi Michele,

    I think there are many different ways to do that. But I don't know any quick one :D

    You could create a valid date from month-column, for example 7 = 1.7.2023 and then change column format to  month full name.

    Or you could create a excel table with the numbers and names of the months and then join it with your data.

    Or you could just create a new formula column with expression:

    If ([CreatedDateTimeMonth] = 1; "January";
    If ([CreatedDateTimeMonth] = 2; "February";
    If ([CreatedDateTimeMonth] = 3; "March";
    If ([CreatedDateTimeMonth] = 4; "April";
    If ([CreatedDateTimeMonth] = 5; "May";
    If ([CreatedDateTimeMonth] = 6; "June";
    If ([CreatedDateTimeMonth] = 7; "July";
    If ([CreatedDateTimeMonth] = 8; "August";
    If ([CreatedDateTimeMonth] = 9; "September";
    If ([CreatedDateTimeMonth] = 10; "October";
    If ([CreatedDateTimeMonth] = 11; "November";
    If ([CreatedDateTimeMonth] = 12; "December";""))))))))))))

     

    -Lasse

  • CPorthouse
    CPorthouse
    Altair Employee
    edited March 2023

    In addition to the previous response, you can also create a new lookup column on the field you are trying to modify and set the appropriate values:

    image

     

    or create a spreadsheet with values and then join them to that spreadsheet.

  • michele_adamski
    michele_adamski Altair Community Member
    edited March 2023

    In addition to the previous response, you can also create a new lookup column on the field you are trying to modify and set the appropriate values:

    image

     

    or create a spreadsheet with values and then join them to that spreadsheet.

    Yes! I found the Lookup Column and was able to convert, but I appreciate the SQL.

    Thanks, Chris! 

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.