Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AsDateTime problem

Status
Not open for further replies.

heydyrtt

Programmer
Dec 12, 2001
63
US
Hello,

Having problems with tblMaildate->AsDateTime = Now();
What I'm doing is, Onclick event I open table, and append after the append I have the AsDateTime = Now() which puts the todays date in the date field. Well it works the first time, after I post and click for a new record again it gives me a date about 15 days out, like today is 7/26 it will give a date 8/18/2004. If I close my form and go back in after a post it works fine, it's just when I leave the form open and add new record that it does this. Any suggestions?

Heydyrtt
 
Seems to me I had something similar. I had to use a TDateTime variable before I put it into the table. Something like:
Code:
TDateTime CurrentDateTime = Now();
tblMaildate->AsDateTime = CurrentDateTime;

This is off the top of my head so be aware . . . If nothing else, it should make debugging easier.

James P. Cottingham

There's no place like 127.0.0.1.
There's no place like 127.0.0.1.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top