long form of year to short form?

This is a discussion on long form of year to short form? within the C Programming forums, part of the General Programming Boards category; Can anyone help me with the code which goes from the long form the year to the short form? Example: ...

  1. #1
    Registered User
    Join Date
    Dec 2001
    Posts
    8

    long form of year to short form?

    Can anyone help me with the code which goes from the long form the year to the short form?

    Example:
    2001 to 01
    2002 to 02

    I don't want to do a subraction of 2000.

    Thanks
    BC

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    > Can anyone help me with the code which goes from the long
    > form the year to the short form?

    shortYear = longYear %100;

    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Registered User
    Join Date
    Dec 2001
    Posts
    8
    Thanks quzah for the help!

    BC

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Inserting a swf file in a windows application
    By face_master in forum Windows Programming
    Replies: 12
    Last Post: 05-03-2009, 12:29 PM
  2. Dev-cpp - compiler options
    By tretton in forum C Programming
    Replies: 7
    Last Post: 01-06-2006, 06:20 PM
  3. My Allegro Program will not run...
    By Vicious in forum Game Programming
    Replies: 17
    Last Post: 06-14-2002, 01:49 AM
  4. Replies: 1
    Last Post: 01-23-2002, 03:34 AM
  5. can someone check this out and let me know ?
    By javaz in forum C Programming
    Replies: 5
    Last Post: 01-21-2002, 02:13 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21