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

  • Home
  • SEARCH
  • 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 604605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:03:23+00:00 2026-05-13T17:03:23+00:00

In order to learn some basics I’ve undertaken creating an app that displays two

  • 0

In order to learn some basics I’ve undertaken creating an app that displays two quotes a day. I’m having trouble figuring out how to work with the current date, which will be pretty necessary if I’m going to get this thing running.

My current plan is to name my .txt files with the quotes by day, and then get my filePath string to conform to the names of these files based on what day it is. For example, if it was January 30th, I’d have to find a way to turn the date into the string “01.30a” and “01.30b”. (‘a’ and ‘b’ because of the whole two quotes a day thing). Any other regularized form would work, of course. This would require me to get the date into the string with a specific form, and to add a single character to the string. How might I accomplish this?

My second question is similar: How can I get the date into a string in the form “mm/dd/yy”? (so as to display it in a label)

Clearly I’m pretty new to this, and any help would be greatly appreciated! Thanks!

  • 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-05-13T17:03:23+00:00Added an answer on May 13, 2026 at 5:03 pm

    The date can be formatted into a string using NSDateFormatter.

    NSDateFormatter* fmtr = [[NSDateFormatter alloc] init];
    [fmtr setDateFormat:@"MM/dd/yy"];
    NSString* label_str = [fmtr stringFromDate:date];
    
    [fmtr setDateFormat:@"MM.dd"];
    NSString* key_str = [fmtr stringFromDate:date]; // append "a" & "b" yourself.
    [key_fmtr release];
    

    (Suggestion: It’s easier to use a .plist, which can be converted to a dictionary with internal functions, then parsing a .txt.)

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

Sidebar

Related Questions

I've been recently asked to learn some MATLAB basics for a class. What does
I am trying to use examples that are fun/interesting to me in order to
I am trying to learn JPA, and Sun tutorial on JPA (order application) is
Im trying to learn how to set up a Zend framework web application from
I'm a desktop application developer. I'm creating a basic website from which to sell
I need to know what are the right order of the PHP learning steps,
I have recently begun the process of trying to learn Ruby/Rails and have been
I'm using Jquery UI 1./Dan Wellman/Packt Publishing to learn JQuery UI. I'm working on
I've been interested in D for a couple of years now and recently decided

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.