Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / January 2005

Tip: Looking for answers? Try searching our database.

How can i retrive a Date and Time?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Giap - 30 Jan 2005 07:18 GMT
i would like to use date and time to name as my file name..
But how can i retrieve a Date and Time??
For example, now is 30/1/05(dd:mm:yy) , 13.06.30(hh:mm:ss)
i would like to name my file as 050130130630.txt
So how can i do that?
Thks for helping


William DePalo [MVP VC++] - 30 Jan 2005 14:57 GMT
> i would like to use date and time to name as my file name..
> But how can i retrieve a Date and Time??
> For example, now is 30/1/05(dd:mm:yy) , 13.06.30(hh:mm:ss)
> i would like to name my file as 050130130630.txt
> So how can i do that?

You can get the binary components of the time and date by calling
GetLocalTime() or GetSystemTime() if you want UTC.

It is for as simple a displayable format as you have, but you can use
GetDateFormat() and GetTimeFormat() to format the binary data.

Regards,
Will

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.