Blog Details

img
Data Science

How do I display the current Date format

Spoke Right / 17 Nov, 2023

Current Date in Android Studio

How do I display the current Date format?

If you don’t need the date to update automatically, you can insert the current date as text. On the Insert tab, in the Text group, click Date & Time. In the Date and time dialog box, select the format you want and click OK. The date is inserted as text.

Calendar c = Calendar.getInstance();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String strDate = sdf.format(c.getTime());
Log.d("Date","DATE : " + strDate)

Android java get current

import java.time.*;
LocalDate date = LocalDate.now();
import java.time.*;
LocalDateTime datetime = LocalDateTime.now();

0 comments

Warning: PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20210902/imagick.so (/usr/local/lib/php/extensions/no-debug-non-zts-20210902/imagick.so: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20210902/imagick.so.so (/usr/local/lib/php/extensions/no-debug-non-zts-20210902/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0