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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calculated field in query (ADP File)? 1

Status
Not open for further replies.

psimon88

IS-IT--Management
Jul 21, 2005
66
US
Hello:

I have a field:(dbo.tbl.dtmTimeStamp) that produces: 5/5/05 5:55 pm. I just want the date; not time. I have an ADP file in Access 2003.

I tried to put this formula in the column of the query:

datevalue(dbo.VM_Leads.dtmTimeStamp)

but datevalue isn't a valid function. Is this a limitation of ADP files? I admit to being relatiavely new to them. This works without incident in Access.

Thanks.
 
It's T-SQL vs Jet SQL - you need the T-SQL equivalents - the usual way, is something like

[tt]Convert(Varchar(10), dbo.VM_Leads.dtmTimeStamp, 101)[/tt]

(or 103 depeding on UK/US or 102 ANSI 104 German...)

But do try something like this, too

[tt]dateadd(d,datediff(d,0,dbo.VM_Leads.dtmTimeStamp),0)[/tt]

Questions like this, might perhaps sometimes be better addressed in the ADP forum (forum958) or, when T-SQL/SQL server syntax is needed forum183

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top