HOW do I get the current DATE?

Results 1 to 2 of 2

Thread: HOW do I get the current DATE?

  1. #1
    Join Date
    Dec 1969

    Default HOW do I get the current DATE?

    Hi.<BR>I wanted to know how I could get the current date using ASP or VBScript. I want to add days to it. IS that even possible? <BR><BR>This is for expiration date purposes.

  2. #2
    Michael Swanson Guest

    Default RE: HOW do I get the current DATE?

    Sure, it&#039s possible...and it&#039s easy! Just use the Date function, like:<BR><BR>MyDate = Date<BR><BR>If you&#039d like the "MyDate" variable to also contain the current time (because date-type variables can contain both), you can use the Now function:<BR><BR>MyDate = Now<BR><BR>To figure out the date 14 days from today (which will take into account leap years, etc.), you can:<BR><BR>MyDate = Date + 14<BR><BR>You get the idea. It&#039s very easy and powerful. Hope this helps.<BR><BR>Michael Swanson, MCSE, MCP+Internet<BR>Webmaster<BR>Donnelly Corporation<BR>

Posting Permissions

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