wrong year

wrong year

hello

I m using the following code:

NSDateFormatter *df = [[NSDateFormatter alloc] init];
[df setDateFormat:@"yyyy"];
NSDate *date = [NSDate date];
NSLog(@"%@", [df stringFromDate:date]);
return;

Its giving me wrong year..

View Answers

October 19, 2010 at 3:00 PM

I think u are using other calendar

Check Settings/General/International/Calendar. Set it back to Gregorian.

check it out !!!









Related Tutorials/Questions & Answers:
wrong year
wrong year..ADS_TO_REPLACE_1   I think u are using other calendar Check... wrong year  hello I m using the following code: NSDateFormatter *df = [[NSDateFormatter alloc] init]; [df setDateFormat:@"yyyy"]; NSDate *date
ModuleNotFoundError: No module named 'wrong'
ModuleNotFoundError: No module named 'wrong'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'wrong' How to remove the ModuleNotFoundError: No module named 'wrong'
Advertisements
leap year
leap year  how to create class for leap year. It is leap year... static boolean isLeapYear(int year) { if (year < 0) { return false; } if (year % 4 == 0) { return true; } else if (year % 400 == 0
What is wrong with this line
What is wrong with this line  What is wrong with this line JOptionPane.showMessageDialog(null? for Using Lewandowski's Savings pgrm!"); from if (input.equals("exit") || input.equals("Exit")) { JOptionPane.showMessageDialog
what is wrong with this program
what is wrong with this program  import java.io.*; class Distance { int feet,inch; void read() { System.out.println("Enter distance in feet and inches "); feet=Integer.parseInt(ob.readLine()); inch
What is wrong with my servlet?
What is wrong with my servlet?  I'd like to know which part of the code is wrong. My code is: print("code sample"); import java.util.*; import java.io.IOException; import java.io.PrintWriter; import
what is wrong in this program
what is wrong in this program  import java.io.*; class Distance { int feet; int inch; void read(int feet, int inch) { System.out.println("Enter distance in feet and inches "); feet=Integer.parseInt(ob.readLine
what is wrong in this program......
what is wrong in this program......  program to implement given inheritance import java.io.*; class Student { int rno; String name; DataInputStream ob = new DataInputStream(System.in); void getRoll
Determining If a Year is a Leap Year in Java
Determining If a Year is a Leap Year in Java       Leap Year: Leap Year is the year contains an extra day. In the leap year, February month contains 29 days since normally
java leap year
as a keyboard inputs or command line argument, a year between 1800 and 2000 and then reports whether itis a leap year. Aleap year is an integer greater than 1584... LeapYear{ public static boolean isLeapYear(int year) { if (year < 0
How to calculate days in a year
How to calculate days in a year  Hi, How to calculate no of days in a year? I want a program that calculates no of days in a year by specifying year... of calculating days in a year? Thanks
Mysql Year of Date
Mysql Year of Date       Mysql Year of Date is used to return the current year of the table... from 'Mysql Year of Date'. To understand and grasp the example we use
Java Leap Year Problem
Java Leap Year Problem  I need help with a writing a program in Java that creates a class Year that contains a data field that holds the number of months in a year and the number of days in a year. It should include a get method
error cannot access class com.opensymphony.xwork2.ActionContext, wrong version
error cannot access class com.opensymphony.xwork2.ActionContext, wrong version  Error(1,32): cannot access class com.opensymphony.xwork2.ActionContext; class file has wrong version 49.0, should be 45.3 or 46.0 or 47.0 or 48.0
name of year in chinese
name of year in chinese   hello my name kiemtheng i'm come from Cambodia, i would to write java programming to calculate a name of year for each... out put . Enter day of birth: 02 Enter month of birth: 10 Enter year of birth
Mysql Date Get Year
Mysql Date Get Year       Mysql Date Get Year is the way of retrieving the current year... 'Mysql Date Get Year'. To understand and grasp this example, we use
Mysql Date Add Year
Mysql Date Add Year       Mysql Date Add Year explains to add the year to the particular... an example from 'Mysql Date Add Year'. To graspe this example, we use Add
name of year in chinese
name of year in chinese   hello my name kiemtheng i'm come from Cambodia, i would to write java programming to calculate a name of year for each birthday in Chinese but i dont know how to do.   import java.util.
Checking whether a year is leap or not
Checking whether a year is leap or not   ... for checking whether a year is a leap year or not. Here, we have taken the year 2000. So...;if else" condition. As we know leap year is divided by the integer 4 and so
JSP Financial Year Table
JSP Financial Year Table  Im trying to design a financial year table...wherein the user enters the data in the table and the same is updated in backend.i have successfully desinged the page but i have certain doubts in jsp
Sql aggregate function with left join wrong output
Sql aggregate function with left join wrong output    I have three tables Stock,InwardEntry,IssueToProd. Part_no in stock is a primary key... I ma getting wrong sum values of i.InvoiceQuantity,p.IssueQuantity column
Sql aggregate function with left join wrong output
Sql aggregate function with left join wrong output    I have three tables Stock,InwardEntry,IssueToProd. Part_no in stock is a primary key... I ma getting wrong sum values of i.InvoiceQuantity,p.IssueQuantity column
Sql aggregate function with left join wrong output
Sql aggregate function with left join wrong output    I have three tables Stock,InwardEntry,IssueToProd. Part_no in stock is a primary key... I ma getting wrong sum values of i.InvoiceQuantity,p.IssueQuantity column
Not sure whats wrong with my code HELP PLEASE?!?!
Not sure whats wrong with my code HELP PLEASE?!?!  I cant figure out what I am doing wrong in my code can anyone help me out??? Grades ADS_TO_REPLACE_1 function computeGrade( ) { var hw, lab, midt, fin, avg; hw
ModuleNotFoundError: No module named 'week-of-year'
ModuleNotFoundError: No module named 'week-of-year'  Hi, My Python... 'week-of-year' How to remove the ModuleNotFoundError: No module named 'week-of-year' error? Thanks   Hi, In your python
leap year logic - Java Beginners
leap year logic  hi frds.. can u give me logic for leap year..  Hi Friend, Please visit the following link: http://www.roseindia.net/java/beginners/Leapyear.shtml Thanks
what is wrong with my JSP codes for updating a form?
what is wrong with my JSP codes for updating a form?  Hi experts, I have tried to emulate a code from a textbook but it doesn't work in my program. Hope someone can advise me where I had gone wrong. Tks. I've set up my
How to Addding 1 Year with PHP
How to Addding 1 Year with PHP  Hi, I am very fresh in PHP language. I trying to create a small application about how to adding 1 year in specific date. Please suggest me. Thanks
What's wrong with my form? - Java Beginners
What's wrong with my form?  Dear expert, I'm having trouble with my enquiry form. Hope you can tell me where my mistake lies. Thanks. Here's my jsp code: Enquiries var objForm = new Object
according to me its ok but is calculating wrong values in
according to me its ok but is calculating wrong values in   program to calculate roman numbers .....i.e roman number calculator import java.util.*; import java.io.*; class romancalci { public static void main(String
What's wrong with my pagination code in JSP?
What's wrong with my pagination code in JSP?  Dear experts, I've tried the following codes which I have copied from Java Ranch forum and deleted whatever lines that NetBean IDE has given me error signal. The resulted page
one year data science masters
one year data science masters  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: one year... that I can learn the topic "one year data science masters". Also tell me
1 year data science masters
1 year data science masters  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: 1 year data... can learn the topic "1 year data science masters". Also tell me which
1 year masters in data science
1 year masters in data science  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: 1 year... that I can learn the topic "1 year masters in data science". Also tell
data science 1 year masters
data science 1 year masters  Hi, I am beginner in Data Science... science 1 year masters Try to provide me good examples or tutorials links so that I can learn the topic "data science 1 year masters". Also tell me which
data science 1 year course
data science 1 year course  Hi, I am beginner in Data Science... 1 year course Try to provide me good examples or tutorials links so that I can learn the topic "data science 1 year course". Also tell me which
data science one year masters
data science one year masters  Hi, I am beginner in Data Science... science one year masters Try to provide me good examples or tutorials links so that I can learn the topic "data science one year masters". Also tell me
1 year masters in artificial intelligence
1 year masters in artificial intelligence  Hi, I am beginner in Data...: 1 year masters in artificial intelligence Try to provide me good examples or tutorials links so that I can learn the topic "1 year masters
1 year masters data science
1 year masters data science  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: 1 year... can learn the topic "1 year masters data science". Also tell me which
data science 2 year degree
data science 2 year degree  Hi, I am beginner in Data Science... 2 year degree Try to provide me good examples or tutorials links so that I can learn the topic "data science 2 year degree". Also tell me which
machine learning final year project
machine learning final year project  Hi, I am beginner in Data...: machine learning final year project Try to provide me good examples or tutorials links so that I can learn the topic "machine learning final year
final year project on artificial intelligence
final year project on artificial intelligence  Hi, I am beginner... to learn: final year project on artificial intelligence Try to provide me good examples or tutorials links so that I can learn the topic "final year
final year project artificial intelligence
final year project artificial intelligence  Hi, I am beginner... to learn: final year project artificial intelligence Try to provide me good examples or tutorials links so that I can learn the topic "final year project
Java converts any given year to Roman Numeral
Java converts any given year to Roman Numeral  Write a program that converts any given year to Roman Numeral
Add year to Date without using Calendar in java
Add year to Date without using Calendar in java  how could i add a year to a date function without using calendar functions
masters in data science 1 year
masters in data science 1 year  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: masters in data science 1 year Try to provide me good examples or tutorials links so
JDBC : Get year from Date
JDBC : Get year from Date In this section, you will learn how to get year from date. Get year from Date : In MySql you can get year from the given Date by using year() function.ADS_TO_REPLACE_1  YEAR(date) : This method returns
ModuleNotFoundError: No module named 'odoo11-addon-account-fiscal-year'
ModuleNotFoundError: No module named 'odoo11-addon-account-fiscal-year' ...: ModuleNotFoundError: No module named 'odoo11-addon-account-fiscal-year' How to remove the ModuleNotFoundError: No module named 'odoo11-addon-account-fiscal-year'
ModuleNotFoundError: No module named 'odoo9-addon-account-fiscal-year'
ModuleNotFoundError: No module named 'odoo9-addon-account-fiscal-year' ...: ModuleNotFoundError: No module named 'odoo9-addon-account-fiscal-year' How to remove the ModuleNotFoundError: No module named 'odoo9-addon-account-fiscal-year' error
ModuleNotFoundError: No module named 'one_year_ago'
ModuleNotFoundError: No module named 'one_year_ago'  Hi, My Python... 'one_year_ago' How to remove the ModuleNotFoundError: No module named 'one_year_ago' error? Thanks   Hi, In your python

Ads