🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cn.bbs.comp.database
Article #8298

Re: ��VC�����ȡ��¼��Recordset�е�datetimeֵ

#8298
From: �ҵ�id�ܳ�
Date: Sun, 30 Nov 2003 06:36
29 lines
2168 bytes
Ŷ����֪����
SQL server����YEAR,MONTH,DAY����
������������
SELECT YEAR(Birthday)������

������MySQL����EXTRACT(YEAR FROM Birthday)����

�� �� myidhenlong (�ҵ�id�ܳ�) �Ĵ������ᵽ: ��
: �ͺ�����������
: Recordset->Open("SELECT Birthday FROM Person WHERE Num=1",
:                  theApp.m_pConnection.GetInterfacePtr(), 
:                  adOpenDynamic,
:                  adLockOptimistic,
:                  adCmdText);
: //Person���������һ������Ϊbirthday,����Ϊdatetime����������Ϊ'1992-1-1'
: variant_t var;
: var = Recordset->GetCollect("Birthday");
: �Ҹ���ôȡ��birthday�����е��ꡢ�¡���
: ...........................

--
|            ��   \       /   ��            |
\��\��\��|��|  \   \     /   /  |��|��/��/��/
 \  \  \ |  |    ��       ��    |  | /  /  /
  �� ��t|��|                   |��|�s�� ��
         |  |     �ұ����㣡    |  |
          ��                     ��         

�� ��Դ:������δ��վ bbs.pku.edu.cn��[FROM: 162.105.53.41]
Technical Details
Message-ID: <49SbCa$YW4@bbs.pku.edu.cn>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!c03.atl99!news.webusenet.com!ngpeer.news.aol.com!feed2.newsreader.com!newsreader.com!maily.cic.tsinghua.edu.cn!news.happynet.org!PKU

Show Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB
X-Google-Thread: 101948,13bf4f091420ddad
X-Google-Attributes: gid101948,public
X-Google-ArrivalTime: 2003-11-29 22:37:19 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!c03.atl99!news.webusenet.com!ngpeer.news.aol.com!feed2.newsreader.com!newsreader.com!maily.cic.tsinghua.edu.cn!news.happynet.org!PKU
From: myidhenlong@bbs.pku.edu.cn (�ҵ�id�ܳ�)
Newsgroups: cn.bbs.comp.database
Subject: Re: ��VC�����ȡ��¼��Recordset�е�datetimeֵ
Date: 30 Nov 2003 06:36:41 GMT
Organization: ����δ��վ
Message-ID: <49SbCa$YW4@bbs.pku.edu.cn>
Mime-Version: 1.0
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: 8bit
X-Filename: Database/M.1070174052.A
Lines: 29