Retrieve month part from date saved in sqlite database table for displaying month wise data

后端 未结 2 1869
别跟我提以往
别跟我提以往 2020-12-12 04:47

hope every one is doing well :)

I have struck with retrieving the month from the date that is saved in sqlite database.First of all,I would like to thank some of the

2条回答
  •  臣服心动
    2020-12-12 05:13

    you can use dateFormat for retrieving month from date:

    NSDate *today = [NSDate date];

    NSDateFormatter *monthFormat = [[NSDateFormatter alloc] init];
    [monthFormat setDateFormat:@"MM"];
    

提交回复
热议问题