Answers for "groovy today date with format"


get date now groovy

import java.text.SimpleDateFormat 
import java.util.Date

Date now = new Date();
Calendar calendar = Calendar.getInstance();

int yearNow = calendar.get(Calendar.YEAR)
int monthNow = calendar.get(Calendar.MONTH)
int dayNow = calendar.get(Calendar.DAY_OF_MONTH)
Posted by: Guest on March-11-2021

Code answers related to "groovy today date with format"

Browse Popular Code Answers by Language