Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > C++ Programming
|
C++ Programming General discussions for the C++ language. For questions specific to Microsoft's Visual C++ variant, see the Visual C++ forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C++ Programming section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old June 10th, 2009, 03:24 PM
Registered User
 
Join Date: Jun 2009
Posts: 1
Thanks: 0
Thanked 1 Time in 1 Post
Default C++ Time and Date Manipulation

Hi I am currently working on a porject I class that involves manipulating the time and date and can not figure out how to go about doing it.

The program is supposed to simulate a shipping company, and I need to to say when the package is delivered. So what I basically need is for it to find the current time and date, and than just add a certain number of days to it, anywhere from 1 to 9 days. Your help would be much appreciated.
Reply With Quote
The Following User Says Thank You to Stoibeaj For This Useful Post:
  #2 (permalink)  
Old June 20th, 2010, 07:51 PM
Registered User
 
Join Date: Jun 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am looking for examples, using VC, on how to retrieve gmt time, what days daylight saving time begins and ends. Indicating "GMT + or - # and so forth, and what time zone and etc.
I want to incorporate this feature into my complete date manipulation tool box. Can anyone help me out please.

Thx, Gumballs
Reply With Quote
  #3 (permalink)  
Old August 2nd, 2010, 04:45 PM
Registered User
 
Join Date: Jul 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Code:
		/*MessageBox::Show(System::DateTime::Now.Ticks.ToString());
		MessageBox::Show(System::DateTime::Now.ToString("yyyy"+" "+"dd"+"  "+"hh"+"  "+"mm"));
			// displays the full name of the day ( ie Monday );
		MessageBox::Show(System::DateTime::Now.ToString("dddd"));
		MessageBox::Show(System::DateTime::Now.ToString("ss")); */

		System::DateTime today = System::DateTime::Now;
		System::DateTime answer = today.AddMilliseconds(2000);
		while (System::DateTime::Now <= answer);
		//this->button4->Visible  = "False";
		this->button4->Visible  = false;
Dont know about GMT
Martin
Reply With Quote
  #4 (permalink)  
Old August 22nd, 2010, 11:03 PM
Registered User
 
Join Date: Aug 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

IF you could add the feature of auto day light saving this would be an add ;)
Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
Date Manipulation pallone Javascript How-To 2 May 5th, 2006 02:15 PM
HELP Needed in Date Manipulation kunjan SQL Language 9 March 19th, 2006 09:51 PM
Time objects comparison and manipulation x_ray Javascript How-To 1 November 29th, 2005 09:55 AM
Date manipulation otarboy Access 1 September 20th, 2004 11:50 AM
Time manipulation rajanikrishna Classic ASP Databases 1 May 11th, 2004 03:03 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.