Top "Nsdateformatter" questions

Class that creates string representations of NSDate (and NSCalendarDate) objects, and convert textual representations of dates and times into NSDate objects.

iOS: How to get a proper Month name from a number?

I know that the NSDateformatter suite of functionality is a boon for mankind, but at the same time it is …

ios numbers nsdateformatter
Swift 3.0 : Convert server UTC time to local time and vice-versa

I want to convert server UTC time to local time and vice-versa. Here is my code.. var isTimeFromServer = true var …

swift nsdate nsdateformatter nsdatecomponents
How to get NSDate day, month and year in integer format?

I want to get the day, month and year components of NSDate in integer form i.e. if the date …

iphone datetime date nsdate nsdateformatter
Get current iPhone device timezone date and time from UTC-5 timezone date and time iPhone app?

In my iPhone application i am very struggling to convert the webservice response time to current device time. The webservice …

ios objective-c swift nsdate nsdateformatter
How do I get an ISO 8601 date on iOS?

It's easy enough to get the ISO 8601 date string (for example, 2004-02-12T15:19:21+00:00) in PHP via date('c'), but …

ios nsdate nsdateformatter iso8601
Using DateFormatter on a Unix timestamp

I get a crash when running and it points at the dateFormmater.timezone. The error in the console is: Could …

swift date nsdateformatter date-formatting
Converting a date format in objective C

How can i convert the following date "Sun Jul 17 07:48:34 +0000 2011" to the following format "2011-07-17 07:48:34"? I used NSDateFormatter as shown …

iphone objective-c ios nsdate nsdateformatter
iPhone OS: How do I create an NSDate for a specific date?

Seems like a simple thing but I can't seem to find a way to do it. It would be great …

ios cocoa-touch nsdate nsdateformatter nscalendar
How do I get the current Date in short format in Swift

In the images below you can see the code I wrote and the values of all the variables: class fun …

swift date nsdate nsdateformatter dateformatter
How to convert date format from dd/MM/YYYY to YYYY-MM-dd in swift

I tired to covert from 21/07/2016 to 2016-07-21 but got this date 2015-12-20 Here is the Code that i …

ios swift nsdateformatter