VBScript-asp DATE!

Results 1 to 2 of 2

Thread: VBScript-asp DATE!

  1. #1
    Join Date
    Dec 1969
    Posts
    51

    Default VBScript-asp DATE!

    Hi,...anyone can help...please?<BR><BR>I&#039m doing a program to allow administrators to view some reports from a file day by day and I&#039m trying to<BR>allow the user to view for the &#039next day&#039 and &#039previous day&#039....<BR>no problem for the &#039next day&#039- i used the DateAdd function....<BR><BR>But what can we use for the case of &#039previous day&#039?? there&#039s problem with the end of each month and we have to consider leap year etc....any help? any free code?:) I&#039m stuck!<BR><BR>thanks a lot!:)

  2. #2
    Nathen Grass Guest

    Default RE: VBScript-asp DATE!

    You can still use the DateAdd function:<BR><BR>theDate = "3/1/95" &#039 95 was a leap year<BR><BR>prevDay = DateAdd("d", -1, theDate)<BR><BR>The value in prevDay will be 2/28/95.

Posting Permissions

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