Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8069641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T13:07:01+00:00 2026-06-05T13:07:01+00:00

I have some values that are stored with core data, and I have opened

  • 0

I have some values that are stored with core data, and I have opened the application’s sqlite database to make sure that the values are being stored correctly, but when I try to display the values they come out all funky. I store the values from the core data entity in an array then try to call the values. Basically I am new to developing with objective c and think I need some formatting help. Here is the code block displaying the funky numbers on output:

NSDateFormatter* dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setTimeStyle:NSDateFormatterMediumStyle];
NSString *dateString = [dateFormatter stringFromDate:dJournal.dateTime];

cell.dateLabel.text = dateString;
cell.insulinTypeLabel.text = dJournal.insulinType; 
cell.glucoseLevelLabel.text = [NSString stringWithFormat:@"%e",dJournal.glucoseLevel ];
cell.carbTotalLabel.text = [NSString stringWithFormat:@"%d",dJournal.carbTotal ];
cell.insulinAmountLabel.text = [NSString stringWithFormat:@"%E",dJournal.insulinUnits ];

return cell;

Here is the core data generated class file:

@property (nonatomic, retain) NSDate * dateTime;
@property (nonatomic, retain) NSNumber * glucoseLevel; //Double
@property (nonatomic, retain) NSString * insulinType;  //string - no problem with
@property (nonatomic, retain) NSNumber * insulinUnits; //Double
@property (nonatomic, retain) NSNumber * carbTotal; //Integer64

I also have tried:

[[NSNumber numberWithInt:carbTotal] stringValue]

no luck. Thanks in advance for any help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T13:07:02+00:00Added an answer on June 5, 2026 at 1:07 pm

    Why are you using %e, %d etc? If you want to print out objective-C objects you need to use the %@ format specifier, e.g.

    cell.glucoseLevelLabel.text = [NSString stringWithFormat:@"%@", dJournal.glucoseLevel];
    

    If you are displaying numbers however, you should actually be using an instance of NSNumberFormatter to generate locale-aware strings.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my C++ application, I have some values that act as codes to represent
We have our own data streaming algorithm that include some metadata+records+fields values. Currently we
I have a Core Data based application that stores hierarchal data displayed using a
I have a large auditing stored procedure that prints values and runs some SELECT
I have some data that I have stored in a list and if I
Introduction I have some sort of values that I might want to access several
I have some code that sets up a dictionary with some defualt values for
I have the problem, that MSSQL Server 2000 should select some distinct values from
I have an NSOperation which fetches some objects from a core data persistent store
I have a document based application running with core data. The object model has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.