Here you can find the source of FormatDate(String aDate)
Parameter | Description |
---|---|
aDate | string, format: %s.%s.%s |
public static String FormatDate(String aDate)
//package com.java2s; //License from project: Apache License public class Main { /**/*from ww w.j a v a 2s . co m*/ * Change the separator of the date * @param aDate string, format: %s.%s.%s * @return %s-%s-%s */ public static String FormatDate(String aDate) { String[] lParts = aDate.split("\\.", 0); return String.format("%s-%s-%s", lParts[0], lParts[1], lParts[2]); } }