ios - I want to get today's date without time -


currently doing comparing date olddate today's date

             nsdate *dt = [nsdate date];              nscomparisonresult result = [olddate compare:dt];             if (result == nsorderedascending)             {                //             } 

dt gives me today's date time also. want date , no time. how can achieve ?

nsdateformatter *dateformatter = [[nsdateformatter alloc]init]; [dateformatter setdateformat:@"dd/mm/yyyy"]; nsstring *datestring=[dateformatter stringfromdate:[nsdate date]]; 

Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

php - MySQLi multi_query results for later use -