Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
guyInATL
Starting Member
1 Post |
Posted - 2004-09-29 : 10:52:06
|
Hi, What is the proper way to store in a field if I want to store current date AND time as a timestamp. I chose Date/Time as the data type and General Date in the Format. Now I wanted a timestamp whenever a new row is added so I placed =Date() in the default value but it only shows me the date, not the time? Second question if you know Java: I retrieve this date in a java.sql.date and .toString() shows me the correct result in the default format but when i use the DateFormat.format() method on it, i get a Null Pointer Exception. What could be the problem? Thanks! Mr. R |
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2004-09-29 : 11:02:12
|
read what the DATE() function returns in Access VBA help. Then click the "See Also" button and you will see a function in there that returns the date and the time as well ....remember that the data you store and how you display it are two completely different things -- try not to get the two concepts confused. As for java -- it might be a *little* easier to help you if you show us your Java code ....- Jeff |
 |
|
|
|
|