FastPrepCompare Calendar Dates
Problems/Compare Calendar Dates

Compare Calendar Dates

Wells Fargo logoWells Fargo● EasyINTERNPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: The report asks you to compare two dates in dd/mm/yyyy format. It leaves out validity limits, what to do for equal dates, and the function interface. Our version is about 82% the same as the reported question.

Given two valid Gregorian calendar dates firstDate and secondDate in dd/mm/yyyy format, return the later date in the same format.

If the dates are equal, return firstDate.

Function

laterDate(firstDate: String, secondDate: String) → String

Examples

Example 1

firstDate = "15/04/2026"secondDate = "20/03/2027"return = "20/03/2027"

The year 2027 is later than 2026.

Example 2

firstDate = "29/02/2024"secondDate = "01/03/2024"return = "01/03/2024"

March 1 follows February 29 in the leap year 2024.

Example 3

firstDate = "07/09/2030"secondDate = "07/09/2030"return = "07/09/2030"

The dates are equal, so the function returns firstDate.

Constraints

  • Each input contains exactly 10 characters in dd/mm/yyyy format.
  • Both inputs are valid Gregorian dates with years from 1900 through 9999.
  • Day and month values are zero-padded to two digits, and the year is zero-padded to four digits.

More Wells Fargo interview questions

  • Count Server ReplacementsOA · PHONE SCREEN · Seen Feb 2026
  • Minimum Remaining LengthOA · PHONE SCREEN · Seen Feb 2026
  • Count Array Element FrequenciesPHONE SCREEN · Seen May 2025
  • Single-Nested Valid Bracket SubstringsPHONE SCREEN · Seen Sep 2020
  • Server Upgrade PlanningOA · Seen Nov 2026
  • Student and Course EnrollmentOA · Seen Nov 2026
  • Bond Interest Summary Above 3%OA · Seen Oct 2026
  • Count Phrases Formed by Anagram ReplacementOA · Seen Oct 2026
  • Event Statistics AggregatorOA · Seen Sep 2026
  • Ordered Deployment Configuration ValidatorOA · Seen Sep 2026

Similar questions at other companies

  • Restricted Decimal Number ValidatorLinkedIn · PHONE SCREENLinkedIn interview questions
  • Validate Timestamped Message RecordsStripe · PHONE SCREENStripe interview questions
  • Extensible Grep Line FilterBloomberg LP · PHONE SCREENBloomberg LP interview questions
  • Format CSV Rows as an ASCII TableAmazon · PHONE SCREEN
  • CSV Row SerializerMercor · PHONE SCREENMercor interview questions
  • Host Log ParserVerkada · PHONE SCREENVerkada interview questions
  • Length-Prefixed String CodecSnowflake · PHONE SCREENSnowflake interview questions
  • Query Log MatchDatadog · PHONE SCREEN · ONSITE INTERVIEWDatadog interview questions
  • Machine Message RouterOpenAI · PHONE SCREENOpenAI interview questions
  • Parse and Query Server LogsKikoff · PHONE SCREENKikoff interview questions

Wells Fargo interview experiences

  • Wells Fargo OA: What It Tests (2026)
  • Wells Fargo SWE Intern OA and Interview Questions: 18 Experiences
All Wells Fargo interview questionsSee Wells Fargo hiring insights
Saved
class Solution {
    public String laterDate(String firstDate, String secondDate) {
      // write your code here
    }
}
Checking account…