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

Modify Date Field

Status
Not open for further replies.

Jaminj

Technical User
Feb 19, 2005
54
US
I have a report that has a date field that shows the date and time. Is there a way I can remove the time value from this field? The problem is that it is creating seperate columns for each different time for the same date. I would like all data for a particular date to be together in one column. Hopefully this makes sense.
 
Sure. Create a formula using Date().

For example, if your field is UserDateTime, create a formula using Date(UserDateTime).

This will strip the time off your datetime field and just return the date.
 
If you are not using the time portion at all, then click on File->Report Options and click on the date from the dropdown menu on Convert Date-Time Field:

Or

From the Report design canvas, right click on the field_>Format Object. From there, click on the date tab and select the format you want.

-LW
 
I think you have to either convert the datetime to a date in report options (if this option is available to you) or use the date() function. Changing the format will still result in multiple columns.

-LB
 
If the field is of type datetime (right click it and select browse data to learn it's type), then bbgbp seems to have nailed it.

If not, convert it to a date type (not datetime) in a formula and use the formula.

-k
 
Thanks everyone for the tips. This report is setup using a cross tab report. If I create the formula, how do I get this into the cross tab? I'm used to reports that have the details section.
 
The formula {@date}:

date({table.datetime})

...will be available on the field list within the crosstab expert. Use it for your column or row field.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top