ASP code obtains the number of years, the number of quarters, the number of weeks, the number of days, the number of hours, the number of minutes, the number of seconds code

Source: Internet
Author: User

<% 'Get current date and time %>
<% = Now () %>
<% 'Get current year %>
<% = Datepart ("YYYY", now () %>
<% = Year (now () %>
<% 'Get the quarter number in the current year %>
<% = Datepart ("Q", now () %>
<% 'Get the nth month of the current year. %>
<% = Datepart ("M", now () %>
<% = Month (now () %>
<% 'Get the number of weeks in the current year %>
<% = Datepart ("ww", now () %>
<% 'Get the day of the current month %>
<% = Datepart ("D", now () %>
<% 'Get current date %>
<% = Date () %>
<% 'Get current time %>
<% = Time () %>
<% 'Get the hour portion of the current time %>
<% = Hour (now () %>
<% 'Get the minute portion of the current time %>
<% = Minute (now () %>
<% 'Obtain the seconds of the current time. %>
<% = Second (now () %>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.