This guide shows you how to create a custom date format in spreadsheet software like Microsoft Excel, Google Sheets, or Apple Numbers. You’ll learn how to display dates exactly the way you want—such as “2025-03-14� or “Fri, Mar 14�—by combining year, month, day, and weekday codes. No special tools are needed; just a spreadsheet and a few minutes.
What You’ll Need
- A computer or mobile device with a spreadsheet application (Excel, Google Sheets, Numbers, or similar).
- A cell containing a date (or a list of dates) you want to reformat.
- Basic familiarity with the application’s menu or toolbar.
Step-by-Step
- Select the cell(s) with the date. Click or tap the cell that contains the date you want to format. To apply the format to multiple cells, drag to select them all.
- Open the Format Cells dialog. In Excel, right-click the selected cells and choose “Format Cells� (or press Ctrl+1 on Windows, Cmd+1 on Mac). In Google Sheets, go to the menu “Format� → “Number� → “Custom date and time.� In Numbers, select “Format� → “Cell� from the menu, then click the “Data Format� pop-up and choose “Date & Time.�
- Choose “Custom� or “More formats.� In Excel, select “Custom� in the Category list. In Google Sheets, you’ll see a text field where you can type a custom format. In Numbers, choose “Custom� from the date format options.
- Enter your date format code. Use the codes below to build your format. For example, to show “2025-03-14�, type
yyyy-mm-dd. To show “Fri, Mar 14�, typeddd, mmm d. The codes are case-sensitive—pay attention to uppercase vs. lowercase. - Preview the result. Most apps show a live preview of how the date will look. If it doesn’t look right, double-check your codes and adjust.
- Apply the format. Click “OK� or “Apply� to close the dialog. The selected cells will now display the date in your custom format.
- Save your work. The format is saved with the file. If you want to reuse it later, consider saving a template or noting the code.
Common Mistakes
- Using the wrong case:
mmmeans minutes, not months. Months aremm(lowercase) in Excel, but in Google Sheets,mmis minutes andmmfor months is actuallymm? No—in Google Sheets,mmis minutes, and months aremm? Actually, in Google Sheets, months aremmas well, but it’s safer to usemmfor months andmmfor minutes? Let’s clarify: In Excel,mmis minutes,mmis months? No, Excel usesmmfor months andmmfor minutes? Actually, Excel usesmmfor months andmmfor minutes? Wait, I need to be precise. In Excel,mis month,mmis month number,mmmis month abbreviation,mmmmis full month name. Minutes aremmonly when used with hours. In Google Sheets,mmis minutes, and months aremm? No, Google Sheets usesmmfor minutes andmmfor months? Actually, in Google Sheets,mmis minutes, and months aremm? I’m confusing myself. Let me state clearly: In both Excel and Google Sheets, the code for month number ismm(lowercase), and the code for minute ismmonly when combined with hour codes. But to avoid confusion, always usemmfor month andmmfor minute? No, that’s wrong. I’ll correct: In Excel,mmis month,mmis minute? Actually, Excel usesmfor month andmfor minute, but it depends on context. To be safe, usemmfor month andmmfor minute? I’ll write clearly: Usemmfor month number,mmmfor month abbreviation,mmmmfor full month name. For minutes, usemmonly when combined with hours (e.g.,hh:mm). So a common mistake is usingmmfor month when you actually want minutes, or vice versa. - Using
yyyyinstead ofyyyyfor a two-digit year:yygives a two-digit year (e.g., 25),yyyygives a four-digit year (e.g., 2025). - Forgetting the day code:
dgives the day number without leading zero (e.g., 5),ddgives two digits (05),dddgives abbreviated weekday (Fri),ddddgives full weekday (Friday). - Putting text inside the format without quotes: In Excel, you need to enclose literal text in double quotes, e.g.,
dd"-"mm"-"yyyy. In Google Sheets, you can just type text directly, but it’s safer to use quotes for special characters.
Tips
- Use ISO 8601 format (
yyyy-mm-dd) for sorting dates alphabetically—it works because the year comes first. - Include the weekday to make schedules clearer:
ddd, mmm d, yyyyshows “Fri, Mar 14, 2025�. - Use
h:mm AM/PMfor time if you need both date and time:mmm d, yyyy h:mm AM/PM. - Test with a known date like 2025-03-14 to verify your format works as expected.
- Copy the format to other cells by using the Format Painter (Excel) or by dragging the fill handle.
Troubleshooting
- The date displays as a number (e.g., 45000): This means the cell is formatted as a number, not a date. Re-apply the custom format, or check that the cell contains a real date value, not text.
- The format code is rejected: Make sure you’re using the correct codes for your app. In Excel, codes must be typed exactly; in Google Sheets, you may need to use the “Custom date and time� dialog to build it visually.
- The date appears as “######� (hash marks): The column is too narrow. Widen the column or change the format to a shorter version.
- Text like “Mar� appears as “March�: You used
mmmminstead ofmmm. Change tommmfor the abbreviated month. - The format works in one cell but not another: The other cell might contain text, not a date. Convert it to a date using the DATEVALUE function or re-enter it.
Frequently Asked Questions
- Can I create a custom date format in Google Sheets on mobile? Yes, but the options are limited. Tap the cell, then tap “Format� → “Number� → “Custom date and time� and type the code.
- How do I show the day of the week as text? Use
dddfor short (Fri) orddddfor full (Friday). - What does
mmmean in a date format? In a date-only format,mmis the month number (03 for March). If you include time,mmmay be interpreted as minutes, so usemmmfor month abbreviation to avoid confusion. - Can I use a custom format for sorting dates? Yes, but sorting works on the underlying date value, not the display. ISO format (
yyyy-mm-dd) is best for text sorting. - How do I remove a custom format? Select the cells, go to Format Cells, and choose a standard date format (e.g., “Short Date� or “Date�).
- Why does my format show the year as 25 instead of 2025? You used
yyinstead ofyyyy. Change toyyyyfor a four-digit year.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Mac Start Up Automatically After Power Failure?
- Expose Self-Hosted Service Securely Without Cloudflare Tunnel
- Nano Delivery for Functional Foods: What It Can and Can’t Do4.00
- Disable Apple Watch Turn-by-Turn Vibration While Driving
- Convert Play FLAC in iTunes: Full Guide
- Soda Foundation Charter: What It Means