Announcement

Collapse

New Sub-Forum

In an effort to help make sure there are appropriate categories for topics of discussion that are happening, there is now a sub-forum for databases and database programming under Special Interest groups. Please direct questions, etc., about this topic to that sub-forum moving forward. Thank you.
See more
See less

Need help with program

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need help with program

    I have written a couple of BBS utilities, one that's TriBBS 10.0+
    specific, and one that's generic using the 52-line DOOR.SYS drop
    file. Both programs use date conversion/manipulation using the
    function Date2Num%(A$) found in QuikPak Pro. My problem is:

    both TriBBS 10.0+ & the DOOR.SYS drop file use the "MM/DD/YY"
    format for birthdays. The QPP function will work with the dates
    01/01/1900 to 11/17/2065. However, I can't make use of that
    range because the birthdate strings only contain the last two
    digits of the year.

    Does anybody have an idea for an algorithm I can use to make it
    able to distinguish between which centuries the birthdates lie
    in? I can't think of anything, as I don't believe it's logically
    possible. But, hopefully, somebody can prove me wrong.


  • #2
    Clay,

    If your program is looking for actual birthdays of users of the
    BBS, then the problem can be solved very simply. But if the
    dates being input are historical type dates out of the range of
    01/01/1900 and 11/17/2065 you are right, there is no way to
    calculate the correct date.

    But if the dates being entered are actual birthdays of current
    users, you can do the following.

    First, you probably don't have anyone less than a year old
    on your BBS. Second you probably don't have anyone 98 years
    old on your BBS. So you need to set your lower limit at
    01/01/1901 and your upper limit to 12/31/2000. As the actual
    date changes increment these values by that date.

    First have your program check for the current date whereby
    you can change the lower and upper ranges for setting the
    correct century.

    If actual date is 01/01/2001 then the lower limit would be
    12/31/1902 and the upper would be 01/01/2001. If you have
    a julian date routine this would be very easy to code.

    If the right two characters of the date is 02 to 99 then
    the date is 19xx. If the date is 00 to 01 the date is 20xx.

    Phil


    ------------------


    [This message has been edited by Phil Tippit (edited November 30, 2000).]
    E-Mail:
    pt AT pursuersoft DOT com

    Comment


    • #3
      Thanks, Phil. Those are the steps I've already taken. I'm just
      VERY tired because I've been up all night messing with the two
      programs - that's why I bothered to ask for help on something
      that is logically impossible. I was grasping at straws.

      Sorry to trouble you, and MANY thanks for your prompt reply!


      ------------------

      Comment

      Working...
      X