今天是今年的多少个星期??
解决方案 »
- 制作Ocx控件时 如何实现让外部调用其公共方法
- 一个数据表有差不多100字段,记录也慢慢变大到,几十万条,有什么办法可以提升查询速度?
- 弄了个论坛供大家游玩
- 一个简单问题,给100分!!
- 用什么函数判断一个OLE对象是否存在?对于form,是用assigned,对于OLE对象用什么呢?
- 问大家一个简单问题,做一个数据库程序的具体流程是什么?
- 求救各位大侠,怎样打开浏览一个网页?急急急!!
- 刚刚入门了,如何能够尽快提升自己的水平?
- 百分求救,QRRepot 画报表,数据集与报表列行互换问题.
- 请教一个DBGRID和SQL问题
- 急!怎么样在access中存取image中的图片,撒分
- 怎样将一个程序制作成服务程序,即在登录进系统之前就运行起来的服务程序!
Call WeekOfTheYear to obtain the week of the year represented by a specified TDateTime value. WeekOfTheYear returns a value between 1 and 53. AYear returns the year in which the specified week occurs. Note that this may not be the same as the year of AValue. This is because the first week of a year is defined as the first week with four or more days in that year. This means that if the first calendar day of the year is a Friday, Saturday, or Sunday, then for the first three, two, or one days of the calendar year, WeekOfTheYear returns the last week of the previous year. Similarly, if the last calendar day of the year is a Monday, Tuesday, or Wednesday, then for the last one, two, or three days of the calendar year, WeekOfTheYear returns 1 (the first week of the next calendar year).Note: WeekOfTheYear uses the ISO 8601 standard definition of a week. That is, a week is considered to start on a Monday and end on a Sunday.
Note: WeekOfTheYear returns the same value as the WeekOf function.
函数声明:function WeekofTheYear(Const AValue:TDateTime):word;
ShowMessage(IntToStr(MonthOf(Now)));
ShowMessage(IntToStr(DayOf(Now)));
ShowMessage(IntToStr(WeekOf(Now)));