Tuesday, 7 May 2019

java - get today's date and time as string

I am new to Java and trying to use Calendar object to get date and time of now as a string. I am particularly stuck at object and object conversions.



Here is the format I need (as a string):
2016-03-30T14:21:00Z



If I could just get the date and time format right, I could play around with the string but I am struggling with deprecated methods.




Thank you for replies

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print ...