How to Convert a Date into a Custom Letter and Number Code in WPS Office Spreadsheets
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.

- 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.
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.
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.
Click the cell where you want the code to appear, for example B2 next to the first date in A2.
Type =CHAR(65+YEAR(A2)-2023)&CHAR(64+MONTH(A2))&TEXT(A2,"mmdd") and make sure A2 points to the first release date.
Press Enter, then drag the fill handle from the lower-right corner of B2 down through the remaining date rows.

Define a Reusable DateCode LAMBDA Function
Use this if your version of WPS Spreadsheets supports LAMBDA and you want a named function to reuse across sheets.
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. Open your workbook in WPS Spreadsheets: Launch WPS Office Spreadsheets and open the .xlsx or .xls file that contains the release dates.
- 2. Select the formula output cell: Click the first cell next to your dates where the code should be generated, such as B2.
- 3. Enter the date code formula: Type =CHAR(65+YEAR(A2)-2023)&CHAR(64+MONTH(A2))&TEXT(A2,"mmdd") and press Enter.
- 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. Save in Excel-compatible format: Press Ctrl+S and save the file as .xlsx so it remains compatible with Microsoft Excel.

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.




