473,386 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Can't format Date in Report

In my invoice report, I would like to format DueDate the same way I am formatting InvoiceDate. See example in attached picture.


In Design View, the Report's InvoiceDate is formatted as Medium Date and the Report's DueDate cannot be formatted because the formatting tool is greyed out.

InvoiceDate comes from an existing date field of an existing table.

In the Query, if another field (State) = "NV", I want DueDate to be blank on the report. Otherwise, I want DueDate to be InvoiceDate + 60 as follows:

Expand|Select|Wrap|Line Numbers
  1. DueDate: IIf([State]="NV","",[InvoiceDate]+60)
My IIF statement is working properly and the report is displaying either a blank or a date for DueDate.

I am assuming my problem lies in the way I am creating DueDate. In the Query, is there a better way to define DueDate so that the Report's formatting tool won't be greyed out - and will allow me to format DueDate as a Medium Date?

Attached Images
File Type: jpg Date Format Examples.JPG (13.9 KB, 1917 views)
Mar 4 '13 #1
5 5141
zmbd
5,501 Expert Mod 4TB
In Design View, the Report's InvoiceDate is formatted as Medium Date and the Report's DueDate cannot be formatted because the formatting tool is greyed out.
What type of control is "DueDate" ?
Mar 4 '13 #2
The Control for Due Date is a text box.
Mar 5 '13 #3
zmbd
5,501 Expert Mod 4TB
Let me see if I understand:
Open the report in design view.
Right click the control in question.
Select the Properties option from the menu.
Select the format tab.
- You're saying that the "format" drop down in the grid is also unavailable or just the control in the ribbon/menu bar?

Use the properties box to set the format.
Mar 5 '13 #4
MikeTheBike
639 Expert 512MB
Hi

I think this may do it

DueDate: IIf([State]="NV","",Format([InvoiceDate]+60,"dd-mmm-yy"))

or even

DueDate: IIf([State]="NV","",Format([InvoiceDate]+60,"Medium Date"))

??

MTB
Mar 5 '13 #5
zmbd
5,501 Expert Mod 4TB
MTB:
The formula will work too - so long as you don't mind a string return.
For some reason, the people at MS disable the formating option in the Ribbon for Access 2010 and 2007 for date fields (go figure); however, one can still set the format using the properties of the control so that the value has the expected format and retains the datatype.
Mar 5 '13 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: praba kar | last post by:
Dear All, In Php we can print RFC 2822 formatted date by date('r') with parameter r. Then it will print the below format date. "Thu, 7 Apr 2005 01:46:36 -0300". I want to print same RFC 2822...
2
by: amith | last post by:
hi I have written javascript for comparing two dates in US format and finding out whether the start date is greater than the end date and vice versa. In this attempt i have instantiated the...
4
by: peashoe | last post by:
I have an asp page that uses a calendar.js (pop-up) file to add an exact date format in the text field (txtDDate). My problem is I need some javascript that sets an alert that does not allow them...
0
by: lsy | last post by:
i wonder how can i order my statement interm of "ORDER BY FORMAT(Date, 'mmmm')" with using this it will order by alphabethical but i want it order by month... i had try "ORDER BY FORMAT(Date, 'mm')"...
1
by: Keith Chadwick | last post by:
Been trying to use the ms:format-date() in one of my transformations. I have all of the necessary declarations in my xml as in <?xml version="1.0" ?> <data xml:space="default"...
2
by: jofo | last post by:
Hello All, I have a problem. I inherited a database where someone used DATE as a table field. I actually need to use the Date() function in order to set the date. Everytime I try to use the...
0
by: mannaikarthik | last post by:
Hi, Currently I am designing some reports in ASP.NET using SQL Server reporting services-2000 I want to format a report item (a column in the report) like the following. Just consider a...
2
by: fniles | last post by:
How do you do Format(Date, "mmddyy") in VB.NET ? Thank you
8
by: libsfan01 | last post by:
how can i use regular expressions to ensure a mysql format date entry in a text field? thanks marc
5
mgpsivan
by: mgpsivan | last post by:
Hi, i have form in Asp.net(2003) in that i've to change the format of the date by the following statement Format(Date.Today, "dd/mm/yyyy") but when i give this code the month part displays as...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.