Hi,
Input date is in mm/dd/yyyy format and I want to write a function to change the date format in yyyy-mm-dd format.
Thanks in advance.
|
Contributor
|
|
| 30Apr2010,12:35 | #2 |
|
Code:
For finding the format of date and time with different form,then we can use the following code:
#include<Windows.h>
#include<stdio.h>
void main()
{
SYSTEMTIME var_t;
GetSystemTime(&var_t);
printf("%d\t:%d\t:%d\t:%d\t:%d\t:% d\t" ,var_t.wYear,var_t.wMonth,var_t.wDay
,var_t.wHour,var_t.wMinute,var_t.wSecond);
}
|
|
Mentor
|
![]() |
| 3May2010,12:04 | #3 |
|
How far have you got and where are you stuck? This is *really easy* to do. This is not a free homework service; you must show your work and we will help you get unstuck. But I'm surprised you could be stuck with this; it's just a case of rearranging the string, so have you even tried?
|

