id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

abraskin@mbusd.org 2019_units1-4_practice > yearMonthDay
prev  |  next  |  chance

Given a String in the format "mm/dd/yyyy" where mm represents the two digit month, dd represents the two digit day of the month, and yyyy represents the four digit year, return a String in the format yy-mm-dd where yy is the last two digits of the year, mm is the two digit month, and dd is the two digit day of the month.


yearMonthDay("12/03/1970") → "70-12-03"
yearMonthDay("11/10/2017") → "17-11-10"
yearMonthDay("11/23/2017") → "17-11-23"

...Save, Compile, Run (ctrl-enter)

public String yearMonthDay(String date) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 100

Copyright Nick Parlante 2017 - privacy