Function Problems

How to Convert a Date into a Custom Letter and Number Code in WPS Office Spreadsheets

Muhammad TalhaMuhammad Talha Nov 13, 2026 869 views

Question details

The user needs a WPS Spreadsheets formula that converts a release date into a code made of a year letter, a month letter, and a four-digit month-day number.

How to Convert a Date into a Custom Letter and Number Code in WPS Office Spreadsheets
Product
WPS Office Spreadsheets
Device & OS
not provided
Scenario
A user has release dates in a worksheet and wants to generate a consistent alphanumeric code for each date automatically.
Observed behavior
The expected formula output is an alphanumeric code such as BE0507 for May 7, 2024, rather than manual typing.
Before you start

Select a date cell and confirm that WPS Spreadsheets recognizes it as a date rather than text; if it is text, convert it with DATEVALUE or re-enter it as a date. Keep the date cell reference relative, such as A2, so the formula can be filled down correctly.

Solution 1Recommended

Use the Direct CHAR and TEXT Formula for Any WPS Spreadsheets Version

This is the most compatible method; it builds the date code in a single cell formula without defining a named function.

1
Select the output cell

Click the cell where you want the code to appear, for example B2 next to the first date in A2.

2
Enter the date code formula

Type =CHAR(65+YEAR(A2)-2023)&CHAR(64+MONTH(A2))&TEXT(A2,"mmdd") and make sure A2 points to the first release date.

3
Apply the formula to the rest of the list

Press Enter, then drag the fill handle from the lower-right corner of B2 down through the remaining date rows.

Use the Direct CHAR and TEXT Formula for Any WPS Spreadsheets Version
Example result: If A2 contains 2024-05-07, the formula returns BE0507: B for 2024, E for May, and 0507 for May 7.

Convert Release Dates to Custom Codes in WPS Office Spreadsheets

Use WPS Spreadsheets to create a date-to-code formula with CHAR, YEAR, MONTH, and TEXT, then apply it to your release date column without Microsoft 365-only features.

  1. 1. Open your workbook in WPS Spreadsheets: Launch WPS Office Spreadsheets and open the .xlsx or .xls file that contains the release dates.
  2. 2. Select the formula output cell: Click the first cell next to your dates where the code should be generated, such as B2.
  3. 3. Enter the date code formula: Type =CHAR(65+YEAR(A2)-2023)&CHAR(64+MONTH(A2))&TEXT(A2,"mmdd") and press Enter.
  4. 4. Fill the code down the column: Drag the fill handle from B2 down through the last date row to generate codes for all release dates.
  5. 5. Save in Excel-compatible format: Press Ctrl+S and save the file as .xlsx so it remains compatible with Microsoft Excel.
Free to use WPS Spreadsheets with a familiar formula bar and Excel-compatible functionsDirect CHAR and TEXT formula works without Microsoft 365 or LAMBDA dependenciesOpens and saves .xlsx workbooks so Excel release date files remain compatibleLightweight and easy to use for batch-filling date codes down a column
microsoft office alternative - wps office

Frequently Asked Questions

How does the year letter work in the formula?

YEAR(date) returns the year, and subtracting 2023 makes 2023 equal 0. CHAR(65) is A, so 2023 becomes A, 2024 becomes B, and so on.

What does TEXT(A2,"mmdd") do?

TEXT formats the date as a four-digit month-day number. For May 7 it returns 0507, keeping the leading zero.

Can I use this formula if my dates are stored as text?

It may return #VALUE! if the cell is text. Convert text dates with DATEVALUE, re-enter them as real dates, or use Text to Columns in the Data tab to convert them, then reapply the formula.

Does this formula work without Microsoft 365?

Yes. The direct CHAR and TEXT formula works in WPS Spreadsheets without LAMBDA or Microsoft 365. LAMBDA use depends on your WPS version.

How do I apply this formula to many rows?

Enter the formula in the first output cell and double-click the fill handle; WPS Spreadsheets fills down until the adjacent date column ends.