Solved

Differences between Format and Datepart ?

Posted on 1998-12-23
3
219 Views
Last Modified: 2006-11-17
Hello,
What  are the differences between this two lines (used in a query):
Format([Timeperiod];"ww")

DatePart("ww";[Timeperiod])

??
When and where do I use Format and DatePart ??

0
Comment
Question by:banan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Author Comment

by:banan
ID: 1971937
Edited text of question
0
 
LVL 7

Accepted Solution

by:
spiridonov earned 30 total points
ID: 1971938
From the point of displaying values there is no difference, you can use both. Though Format should be used only for displaying values and returns String , Datepart can be used in calculations and returns integer.


0
 

Author Comment

by:banan
ID: 1971939
Thanx.
Have a nice christmas!
Regards
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question