用CLR吧,在vs2005/2008,建立CLR项目
另外,字符串改下:"2009/02/04 15:20"
#include "stdafx.h"
using namespace System;
int main(array
{
String^ mydate="2009/02/04 15:20";
DateTime Dmydate=DateTime::Parse(mydate); //函数parse()将字符串转化成DateTime型数据
Console::WriteLine(L"{0}",Dmydate);
DateTime Dmydate_1=Dmydate.AddMinutes(3);
String^ mydate_1=Dmydate_1.ToString(); //把日期型数据转换成字符串
Console::WriteLine(L"{0}",mydate_1);
}