Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 03-10-2002, 11:08 AM
Prandini Prandini is offline
Member
 
Join Date: Mar 2002
Posts: 59
Default DateTimePicker

I have a file (.DBF)with some DATE fields (xx/xx/xx).
I am trying to update the file from a DateTimePicker with no success.
Reply With Quote
  #2  
Old 03-10-2002, 11:16 AM
HTML HTML is offline
Senior Member
 
Join Date: Jan 2001
Posts: 2,977
Default RE: DateTimePicker

Hello,

Here is how you might do it:

Table1.Edit;
Table1.FieldValues['Date/Time']:=DateTimePicker->Date;
Table1.Post;

Does that work for you?
Reply With Quote
  #3  
Old 03-10-2002, 11:29 AM
Prandini Prandini is offline
Member
 
Join Date: Mar 2002
Posts: 59
Default RE: DateTimePicker

DM1.Cadastro.Edit;
DM1.Cadastro.FieldValues['Date/Time']:=DateTimePicker->Date;
DM1.Cadastro.Post;

This is what I did and this is the message I received
[Error] Cad5a110.pas(365): Undeclared identifier: 'DateTimePicker'

[Error] Cad5a110.pas(365): Expression expected but '>' found

Sorry , I am new in this language (an old Cobol programmer)
Reply With Quote
  #4  
Old 03-10-2002, 11:41 AM
HTML HTML is offline
Senior Member
 
Join Date: Jan 2001
Posts: 2,977
Default RE: DateTimePicker

Oops sorry type it should be like this:

DM1.Cadastro.Edit;
DM1.Cadastro.FieldValues['Date/Time']:=DateTimePicker.Date;
DM1.Cadastro.Post;

Also is the name of your datetimepicker = DateTimePicker if not just replace DateTimePicker with the name of yours.
Reply With Quote
  #5  
Old 03-10-2002, 12:05 PM
Prandini Prandini is offline
Member
 
Join Date: Mar 2002
Posts: 59
Default RE: DateTimePicker

OK, The program compiled but when I click on a date from the DateTimePicker the number that always appear is :
37320,73 (for example).
If I change the year this number changes too.
Reply With Quote
  #6  
Old 03-10-2002, 01:41 PM
HTML HTML is offline
Senior Member
 
Join Date: Jan 2001
Posts: 2,977
Default RE: DateTimePicker

Hmm, thats weird. Is that what the contents of the field is when you post?
Reply With Quote
  #7  
Old 03-10-2002, 01:59 PM
Prandini Prandini is offline
Member
 
Join Date: Mar 2002
Posts: 59
Default RE: DateTimePicker

Sorry for being a Newbee on Delphi.

I have 2 files. One will have the date in a CHARACTER field (if that is possible. The other will have the date in a field assigned as DATE. I was testing with the field CHARACTER

DM1.Cadastro.Edit;
DM1.Cadastro.FieldValues['Usr1033']:=DateTimePicker1.Date;
DM1.Cadastro.Post;

Note: The field Usr1033 is a character field. Iguess this was the problem.

Josť Prandini
jrprand@yahoo.com.br
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 02:42 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.