So, I was searching for this for some time but I didn't find an answer. Thats why I'm asking here. My problem goes like this: With Swing I made an app that will get text from JTextArea and then save it inside a .txt document. Also it will save 2 more files (as .txt documents too). In one, there would be date (i.e 2016.03.05) and in other would be time (i.e 09:50 AM). What I need is compare the date and time to system date and time and check if they match. I only need a way on how to exactly do this, since they are stored as string, what would be good way to compare them to system date and time. I think that is should be like this:So, I was searching for this for some time but