Create Month and Year Attribute from Existing Date Attribute

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #606 Score: 0
    HEINRICH SARTIN
    Participant

    Hi,

    I have a global temperature dataset (attached) that has a date attribute in the format mm/dd/yy. I would like to create new attributes for month and year. How would I use the Edit Formula function to create these new attributes?

    Link to CODAP dataset: <span style=”background-color: #ffff00; color: #000000; font-family: Montserrat, sans-serif; font-size: 12px;”>https://codap.concord.org/app/#shared=45917</span&gt;

    Thanks,

    #608
    Jonathan Sandoe
    Keymaster

    Create new attributes named, for example ‘month’. Click on the column header for the attribute, then select “Edit Formula…”. For the formula, type “month(dt)”. Apply a similar strategy for year.

    Jonathan

    #609
    Bill Finzer
    Keymaster

    Hello Heinrich,

    CODAP has a pretty complete set of functions for manipulating dates and times as you can see in the enclosed screenshot.

    Bill

    #668
    HEINRICH SARTIN
    Participant

    Thank you Jonathan and Bill!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.