Getting the time and date using api

Thank you very much!