To all:
Can someone please help me about how to convert the time (HH:mm) format to the datetime(yyyy/mm/dd HH:mm:ss) format? I need help.
I already tried this String to a Format yyyy-MM-dd HH:mm:ss Iphone link, but I am having the string in this format HH:mm and I want to convert this into the yyyy/mm/dd HH:mm:ss
Thanks in advance!!
@Neelz saying right If in DB you are saving only hours & minute value then it will be depends on you which date you are using to get the formatted date.I did the same which @Neelz said but in different way.Below I shown the code by considering the today’s date to get the date time as you need
FinalDateTime is the final date which you want.Now to get the number of days between two dates refer following link:
iPhone – get number of days between two dates