Solved

Date Time Picker

Posted on 2002-05-07
6
142 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

717 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