1 ORACLE mid-week related knowledge description 1.1 Date formatting functions To_char (X [,FORMAT]) : Press X toFORMATThe format is converted into a string. X is a date,FORMATis a format string that specifies the format in which X is
Obtain the date range of the week based on the time range of the week.Obtain the date range of the week according to the week
/*** Return the range of Weekly Times of a month in a certain year * @ param weeks Weekly Times * @ return the range of
Kimlarsson calculation formula determines the day
of the week by the date calculateweekday (int y, int m,int d) {
if (m==1| | m==2) m+=12,y--;
int iweek = (d+2*m+3* (m+1)/5+y+y/4-y/100+y/400)%7;
Switch (iweek) {case
0:printf ("Monday \ n");
Def juge (Num, week_list): W = input ('enter the % s letter' % num) W = W. lower () RES = [] State = 0 for week in week_list: If W = week [0 + num-1: 1 + num-1]: State + = 1 res. append (week) If State = 1: Print ('% s' % res [0]) Elif State> 1:
// Determine the date based on the number of weeksPrivate datetime getweekofdate (INT year, int I){// Int month = 1;Datetime yeard = new datetime (year, 1, 1 );Int week = convert. toint32 (yeard. dayofweek );If (week = 0){Week = 7;}
Int outday = I *
Obtain the date range of the week according to the weekObtain the date range of the week according to the week
/*** Return the range of Weekly Times of a month in a certain year * @ param weeks Weekly Times * @ return the range of dates of the
The date () function gets the dates,
The time () function gets the times.The now () function can get the current date plus time.
Now () gets the current system date and time, the ASP output can be written like this: Years (now ()) Gets the year, ASP
1#include 2#include 3 4 /*5 Please enter the first letter of the day of the week to determine the day of the week, if the first letter, then continue to judge the second letter. 6 */7 8 //custom get characters that are not case sensitive.9 intTen
Using System;Using System. Globalization;Namespace ConvertDateTime{/// /// ConvertDateTime returns a brief description of the specified parameters.
/// Public class ConvertDate{Public ConvertDate (){}//************************************** *********
Now () gets the current system Date and Time. asp output can be written as follows:
Year (now () gets the year, ASP output:
Month (now () gets the current month, ASP output:
When day (now () is obtained, ASP outputs:
Minute (now () gets the
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.