Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2002

    Unanswered: Converting Number to date


    I have drop down boxes on my site that allows developers to enter a start date and an end date and a user-defined value corresponding to those dates.

    For example from the dates 12 February 2002 to 22 June 2002 the price is high.

    The drop down boxes return the dates in the format yyyymmdd.

    For example '20020212' corresponds to '12 february 2002' and so on.

    I want to loop through the numbers in the formatyyyymmdd (start date value) to yyyymmdd(end date value) and give each day a user-defined value.

    For example from 2002 06 22 to 2002 08 16 the price is low.

    However I want a check so that when the date reaches the limit for its month (e.g. 2002 01 32 exceeds the limit for january) it will ignore these values and begin inserting the relevant data in the range for the next month (in this case 20020201).

    I have started writing code to do this, but it's very long. I was wondering if anybody can suggest a short way of doing it? Are there any date/caldender scripts out there that can convert number ranges to relevant dates?


  2. #2
    Join Date
    Nov 2001
    Check these function on

    mktime() and strftime()

    those might help you with your problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts