Date and Time Rule

Add timestamps or reformat dates in filenames with format tokens and examples.

Photos missing date info? File names with inconsistent date formats? Add timestamps or unify date formats in one click.

What This Can Help You With

  • Photo Organization: Camera exports don't have date info, want to add shoot time for easy chronological sorting
  • Document Archiving: Scanned documents or meeting notes need processing date, like contract.pdfcontract_2024-01-15.pdf
  • Unified Format: Mixed date formats in file names (2024-01-15 and 2024年1月15日 together), want to standardize to one format
  • Batch Marking: Batch processed files need unified timestamp to distinguish different batches

Quick Start (3 Steps)

  1. Click "Add Rule" button → Select "Date and Time"
  2. Choose what to do:
    • Add Date: Add time to file name (using current time or specified time)
    • Replace Date Format: Change existing date in file name to another format
  3. Click Preview first to see the effect, apply only if it looks good to avoid mistakes

Concrete Examples

Example 1: Add Current Date to Photos

❌ Original files: photo.jpgimage.jpgpic.jpg... 😫 Problem: Photos have no date info, want to add today's date for archiving

✅ Operation:

  • Select: Add Date
  • Time: Use Current Time
  • Format: YYYY-MM-DD (e.g., 2024-01-15)
  • Position: Prefix

✅ Result: 2024-01-15_photo.jpg2024-01-15_image.jpg2024-01-15_pic.jpg...

Why this setting: "Use Current Time" automatically uses today's date without manual selection; placing it as prefix makes files sort chronologically by name.


Example 2: Unify Date Format

❌ Original files: meeting_notes_2024-01-15.docxreport_2024-02-20.docx 😫 Problem: File names have English format dates, want to change to Chinese format 2024年01月15日 for better readability

✅ Operation:

  • Select: Replace Date Format
  • Original Date Format: YYYY-MM-DD
  • Target Format: YYYY年MM月DD日

✅ Result: meeting_notes_2024年01月15日.docxreport_2024年02月20日.docx

Why this setting: "Original Date Format" must match the date in file name exactly to be recognized and converted correctly.


Example 3: Add Specified Time (Fill Missing Fields)

❌ Original files: log_0115.txtlog_0116.txt 😫 Problem: File names only have month-day (0115 means Jan 15), want to change to full date 2024-01-15

✅ Operation:

  • Select: Replace Date Format
  • Original Date Format: MMDD
  • Target Format: YYYY-MM-DD
  • Fill Missing Fields: Year 2024 (original format has no year, target format needs it, so manual input required)

✅ Result: log_2024-01-15.txtlog_2024-01-16.txt

Why this setting: Target format has YYYY (year) but original only has MMDD (month-day), so you need to fill in year in "Fill Missing Fields".

What to Fill In

Basic Settings

  • What to Do Select "Add Date" or "Replace Date Format"
    • Add Date: Add timestamp to file name
    • Replace Date Format: Change existing date in file name to another format

If You Select "Add Date"

  • Time Select "Use Current Time" or "Specify Time"

    • Use Current Time: Automatically uses current date and time, always latest on each execution
    • Specify Time: Manually select a fixed date and time, all files use this same time
  • Date Format Enter desired date format, for example:

    • YYYY-MM-DD (2024-01-15)
    • YYYY年MM月DD日 (2024年01月15日)
    • YYYYMMDD (20240115)
    • YYYY-MM-DD HH:mm:ss (2024-01-15 14:30:00, with hours:minutes:seconds)

    💡 Format Symbol Guide: YYYY=year, MM=month, DD=day, HH=hour, mm=minute, ss=second (case-sensitive!)

  • Insert Position Select where to place the date in file name:

    • Prefix: Add at the beginning, like 2024-01-15_filename.txt
    • Suffix: Add at the end (before extension), like filename_2024-01-15.txt
    • Replace Filename: Replace entire file name with date
    • Absolute Position: Insert at specific character position
    • Before Specific Text: Insert before specific text
    • After Specific Text: Insert after specific text
    • Replace Text: Replace specific text in file name with date

If You Select "Replace Date Format"

  • Original Date Format Current date format in file name, like YYYY-MM-DD (Must match date in file name exactly, otherwise won't be recognized)

  • Target Format Desired format, like YYYY年MM月DD日

  • Fill Missing Fields (Only needed when target format has fields original format doesn't) If target format includes parts original doesn't have, fill manually:

    • Year: For example, original only has MMDD, target needs YYYY-MM-DD, fill in 2024
    • Month: Fill in month (1-12)
    • Day: Fill in day (1-31)
    • Hour/Minute/Second: If adding time, fill these too

Advanced Options (Optional, defaults usually sufficient)

  • Ignore Extension Default enabled, only changes file name, leaves .jpg, .txt and other suffixes alone. Can uncheck if you really need to change extension content.

Frequently Asked Questions

❓ Why does it say "Please Select Date"?

If you selected "Specify Time", you must select a specific date and time in the date picker.

Solution:

  • Either click the calendar icon to select a date
  • Or switch to "Use Current Time" (no date selection needed, automatically uses current time)

❓ Date format not working?

Most common reason: Format symbols written wrong or case sensitivity incorrect.

Check these points:

  • YYYY is year, MM is month, DD is day (must be uppercase)
  • HH is hour, mm is minute, ss is second (hour uppercase, minute and second lowercase)
  • ❌ Wrong: yyyy-mm-dd (lowercase yyyy dd don't work)
  • ✅ Correct: YYYY-MM-DD

❓ Getting "Missing Fields" error when converting format?

Target format has fields that original format doesn't have, you need to fill them manually.

Example:

  • Original format: MMDD (only month-day, like 0115 means Jan 15)
  • Target format: YYYY-MM-DD (needs year)
  • Solution: In "Fill Missing Fields", fill year field with 2024

❓ Replace format not working?

Reason: "Original Date Format" doesn't match date in file name.

Solution:

  1. Copy the date part from file name, like 2024-01-15
  2. Check if "Original Date Format" is YYYY-MM-DD (matching copied format)
  3. Format symbols' case and separators (- / _) must match exactly

Important Notes:

  • ⚠️ Format symbol case matters: MM is month, mm is minute; DD is day, HH is hour - wrong case means wrong results
  • ⚠️ Replace format must match exactly: Original date format and date in file name must correspond completely, including separators (- / _)
  • ⚠️ Don't forget to fill missing fields: If target format has more fields than original (like adding year), must fill in "Fill Missing Fields", otherwise conversion fails

Advanced Techniques

  • Combined with "Find and Replace": First use find and replace to remove old timestamps, then use date rule to add new standardized date
  • Combined with "Sequence Generator": Use date to mark batches, sequence to mark order within batch, like 2024-01-15_document_001.pdf
  • Combined with "Insert Text": First use date rule to add timestamp, then use insert text to add other identifiers (like project name)

What to Look at Next?