Skip to main content

Regular Expressions | How to Extract Year & Month from a Date (yyyyMM)

Yoom Customer Service avatar
Written by Yoom Customer Service
Updated over a week ago

Q:

I have different date formats as outputs.

Is it possible to extract just the year and month (yyyyMM) and use them for file names or values?

A: Yes, it is possible!

To extract just the year and month (yyyyMM) from a date, follow these steps:

  1. Obtain the Date and Time
    First, use the action that retrieves the date and time you want to extract.

  2. Transform the Data
    Select the “Extract Data with Regular Expression” action under data extraction. Apply a regular expression to convert the retrieved date into a yyyyMM format.

  3. Use the yyyyMM Output
    After transforming the date, specify the newly created "yyyyMM" output as the file name for your spreadsheet, or use it as a value in a cell.

📚 Related Guides

Search Keywords

regular expressions, yyyyMM, date format, file name, manipulate data

Did this answer your question?