Solved

Date Time Picker

Posted on 2002-05-07
6
141 Views
Last Modified: 2010-04-04
How can I assign date value from a DateTimePicket (kind : dtkDate) with time value from a DateTimePicket (kind : dtkTime) to a TDateTime variable ?

Andrew
0
Comment
Question by:andrewyu
  • 3
  • 2
6 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6993548
datetime := trunc(datetimepicker1.date)+datetiempicker2.time;

just from head

meikl ;-)
0
 
LVL 7

Accepted Solution

by:
Motaz earned 100 total points
ID: 6993561
meikl, also you have to trim time portion

datetime := trunc(datetimepicker1.date)+ Fract(datetiempicker2.time);
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6993577
:-) i guessed that also, but i can't check it
(no delphi on hand yet)

but atleast it must be frac and not fract, or?

meikl ;-)
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:andrewyu
ID: 6993668
It's done !
Thank you very much !

Andrew
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6993696
seems, i'm lost without delphi on hand :-(
0
 

Author Comment

by:andrewyu
ID: 6993721
Anyway, Thank you very much to you two !!!

Andrew
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Print Graphic and Text to Epson TM-T88v 12 477
SUM 2 INTEGER ARRAYS INTO 1 10 111
Wincontrol not (correctly) drawn 15 48
Typecasting TBytes to Integer in Delphi XE8 2 38
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

726 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