Created
April 9, 2016 08:26
-
-
Save brsc2909/ca41acb794b03c8aaea970f17ee70358 to your computer and use it in GitHub Desktop.
function to return the current time in a given format "yyyy-MM-dd HH:mm:ss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.dropship; | |
import java.text.SimpleDateFormat; | |
import java.util.Date; | |
/** | |
* Created by brsc2909 on 4/7/16. | |
* returns the current time in desired time format | |
*/ | |
class GetTimes { | |
static String nowTime(String tf){ | |
Date date = new Date(); | |
SimpleDateFormat cbi = new SimpleDateFormat(tf); | |
return cbi.format(date); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment