Blog.yiz.name 1. Substringstring in Java: 2004-04-01 / Nindex: 0123456789 10
The index number starts since 0 String.SUSTRING (started index, end index), printing "Started INDEX" to "end index" -1 string If you want to print 2004, String.SUSTRING (0, 4) Second, MySQL Substringstring: 2004-04-01 / Nindex: 123456789 10INDEX number starts String.SUSTRING (Start INDEX, intercepting number) Until the number is intercepted. If you want to print 2004, String.SUSTRING (1, 4)