Results 1 to 3 of 3

Thread: dates

  1. #1
    Join Date
    Dec 1969

    Default dates

    I have a series of forms that interact with a database. I have the user entering in a date using a series of select boxes (month, day, year)and I turn it into a date using the dateserial function. When I retrieve it from the database, I want to display it in a different series of select boxes (month, day, year). How do you take the date apart again?

  2. #2
    LeeAnnie Guest

    Default RE: dates

    My recommendation would be to use the split function:<BR><BR>strDate = RS("dateValue")<BR><BR>dateArray = split(strDate, "/")<BR>For counter = 0 to UBound(dateArray)<BR>Next<BR><BR>When you display the values, you just use the array:<BR>Month = &#060;%=dateArray(0)%&#062;<BR>Day = &#060;%=dateArray(1)%&#062;<BR>Year = &#060;%=dateArray(2)%&#062;<BR><BR>Hope this works for you.

  3. #3
    Join Date
    Dec 1969

    Default Thanks!

    LeeAnnie,<BR><BR>It worked great, thanks for your help!

Posting Permissions

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