Solved

DateTime control in MFC which takes upto milliseconds

Posted on 2004-09-14
3
1,165 Views
Last Modified: 2013-11-20
Hi,

I want to a MFC date time control which can take milliseconds, seconds, minutes & hrs into consideration. I am aware of only CDateTimeCtrl in vc++, but this cannot take milliseconds. I also need to extract time from such a control and do <,>,== comparisions. Can anyone please help me?

Thanks
Madhavi
0
Comment
Question by:j_madhavi
3 Comments
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 30 total points
ID: 12062311
You need to code your own control (or have a separate edit box for the millisecond).

Have a look at SYSTEMTIME for storing/manipulating the times.
Members
wYear
Specifies the current year. The year must be greater than 1601.
Windows XP: The year cannot be greater than 30827.

wMonth
Specifies the current month; January = 1, February = 2, and so on.
wDayOfWeek
Specifies the current day of the week; Sunday = 0, Monday = 1, and so on.
wDay
Specifies the current day of the month.
wHour
Specifies the current hour.
wMinute
Specifies the current minute.
wSecond
Specifies the current second.
wMilliseconds
Specifies the current millisecond.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Importing  SSL Certificate into Firefox using GPO 28 196
substring method in java 1 79
fizzArray2 challenge 1 61
sumHeights2  challenge 7 78
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now