I'm trying to split a date a couple of different ways. In one instance, I want only the date portion. In the other, I want the date and time, but not seconds, milliseconds, etc.
For example, my database gives me the following date, which I promptly assign to $doc_date:
Using the following code, I can get only the date portion:
($date, $discard) = split(" ",$doc_date);
However, if I change my code to:
($date, $discard) = split(":",$doc_date);
I know that I will only get the hour, not the hour and minutes. How can I change my code to give me the proper time (in this case, 14:40), but not the seconds or milliseconds?