update formatTimeSubstring function

- yet to test out
Tested and Fixed getDateString

- omitted some cases
Touched up on functions required in addEvent

- Have run jUnit tests
- todo: check for empty fields in inputData