format adp

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i am using an adp project and i want to use and append query. as part of this
query i want to use (one colum that adds only the time of a general date/time
field)

i am using this as a column name (and it doesnt work)

TimeStamp: Format(Now(), "h:m:s")

it automatically puts ' around it and when i try to run it is states
something like trancated results, or something like that....

what is the proper way to format a date using action query connected to sql
server?

Thanks

lee
 
Dear Lee:

If the column into which you are placing this value is a date/time column,
then formatting is unimportant. The term "formatting" applies only to text
values. A date/time value is NOT stored in any particular format. It is
stored as a binary value whose interpretation is a date and time, and can be
formatted as you wish when it is display. However, there is no formatting
involved in how it is stored. So, if this is the case, just use Now() and
nothing else.

The idea that you "format" a date when you store it in a date/time datatype
is a mistaken concept. You "format" a date/time value after you retrieve it
and before you display it.

This applies equally to Access Jet, MSDE, or SQL Server databases.

Tom Ellison
Microsoft Access MVP
 
Back
Top