Ii am trying to get date and time using date but when i run application it takes first time executed application time and date in short time is not changed.
[NSDate date] makes a date object of the time you call it. You must call it again to update the date. In other words, you must do StrDate = [NSDate date]; whenever you want to get the current date in your method.