Get the data of today only use c language
2008-10-01 21:35
399 查看
#include <time.h>
void CTestDlg::OnOK()
{
time_t rawtime;
struct tm * timeinfo;
time ( &rawtime );
timeinfo = localtime ( &rawtime );
char nowtime[200];
sprintf (nowtime, "%4d_%02d_%02d",1900+timeinfo->tm_year, 1+timeinfo->tm_mon,
timeinfo->tm_mday );
MessageBox ( nowtime );
// CDialog::OnOK();
}
void CTestDlg::OnOK()
{
time_t rawtime;
struct tm * timeinfo;
time ( &rawtime );
timeinfo = localtime ( &rawtime );
char nowtime[200];
sprintf (nowtime, "%4d_%02d_%02d",1900+timeinfo->tm_year, 1+timeinfo->tm_mon,
timeinfo->tm_mday );
MessageBox ( nowtime );
// CDialog::OnOK();
}
相关文章推荐
- [Android] Use Jsoup to grab the web data and process the data with string.indexOf()
- Error: The version of SQL Server in use does not support datatype 'datetime2
- How to get the data from a cell when I click on the GridButtonColumn of the same row
- you try to use the STM32 Library examples with IAR 6.30.6 you get a loot of error
- 【记】研究Sharding-JDBC遇到的一个异常(Caused by: io.shardingsphere.core.exception.ShardingException: Cannot get uniformed table structure for `t`. The different meta data of actual tables are as follows)
- Why does Quora use MySQL as the data store instead of NoSQLs such as Cassandra, MongoDB, or CouchDB?
- Fast ways in R to get the first row of a data frame grouped by an identifier
- #146 – Use GetValueSource Method to Find the Source of a Dependency Property Value
- ADO.NET Entity Framework: The version of SQL Server in use does not support datatype 'datetime2'
- Get the date of the days before today on AIX
- java.sql.SQLException: The connection property 'useUnicode' only accepts values of the form: 'true',
- Data Structure Linked List: Write a function to get the intersection point of two Linked Lists.
- Cannot set the value of read-only property 'outputFile' for ApkVariantOutputImpl_Decorated{apkData=M
- 海洋工作室——网站建设专家:The version of SQL Server in use does not support datatype datetime2 and the Entity Framework.
- The only thing I can think of is to use something like "http://www.dyndns.org/cgi-bin/check_ip.cgi" others may have a be
- Use Jquery to get json data from the server-side php page
- Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.
- Use C# to get JSON Data from the Web and Map it to .NET Class => Made Easy! 转
- C Language Study - the use of symbol '##'
- [转] --- Error: “A field or property with the name was not found on the selected data source” get only on server