• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Query regarding DateFormat
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Query regarding DateFormat


  • Subject: Re: Query regarding DateFormat
  • From: Fritz Anderson <email@hidden>
  • Date: Fri, 28 Nov 2003 20:20:35 -0600

Never call NSLog() with a single argument, if the argument may contain % characters. NSLog treats its first argument as a printf-style format string, and attempts to pull additional parameters off the stack to satisfy %-codes. As your only argument is _guaranteed_ to include %-codes, and you don't provide additional parameters, the result is garbage.

Try again with

NSLog(@"%@", sdf);

-- F

On Nov 28, 2003, at 12:01 PM, Nishant wrote:

When I do an NSLog(sdf) I see "-1.438324e-229/-1/Y"
instead of "%e/%m/%Y".
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Query regarding DateFormat (From: Nishant <email@hidden>)

  • Prev by Date: Re: Using gcc
  • Next by Date: Re: Setting contents of NSTextField to NSCalendarDate
  • Previous by thread: Query regarding DateFormat
  • Next by thread: Re: Query regarding DateFormat
  • Index(es):
    • Date
    • Thread