Solved

Differences between Format and Datepart ?

Posted on 1998-12-23
3
215 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

734 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