Concatenate two date fields in a View


the case is this:
I have 2 date fields, let us say:
Field 1 ------> StartDate, Type: Date
Field 2 ------> EndDate  , Type:date

I have a view and have one column where i need to show the period of StartDate - EndDate in only one column, for example:

01/07/2001 - 30/10/2001

I am writing a formula in that column to concatenate the two date values: @Text(StartDate)+"-"+@Text(EndDate)
but i am getting an error in the column display.

Can you help me to solve this little problem ??

Thanks for your help
Who is Participating?

Improve company productivity with a Business Account.Sign Up

puneetfredConnect With a Mentor Commented:
You could do this-

tStart := @if(@isTime(StartDate);@Text(StartDate);StartDate);
tEnd := @if(@isTime(EndDate);@Text(EndDate);EndDate);

tStart + "-" + tEnd

it should work.

I tried exactly what you were doing by creating a form with two date field and then using the formula
@Text(StartDate)+"-"+@Text(EndDate) in the view. It worked fine for me.

Can you check the properties of these fields in the document for the data type. The only time I get an error if I don't use the @text around the dates. It appears it is some how getting confused with the data type.


Try displaying one date field in the column by using @Text and if it works then try the other.

Lil debugging might help to sort out the problem.  Also check the document properties for the field type and value if there is no value and you are trying to convert that to a text then it might give out an error !

Good Luck!
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

giusepeAuthor Commented:
Hello friends, last night after i wrote this question i went home and i tried again writing the formula
@Text(StartDate)+" - "+@Text(EndDatea) in the view column
and the formula worked fine. Dont know why  while i was doing it in the afternoon did not work or probably i was writing something wrong.

I want to thanks all of you for your comments and proposed answers.

Have a nice weekend !!!
Best regards
Thats interesting !
giusepeAuthor Commented:
Thanks for your help puneetfred, i was trying my formula @Text(StartDate)+" - "+@Text(EndDatea) in the view column
and this worked fine.

Thanks !!!!
giusepeAuthor Commented:
Thanks for your help puneetfred, i was trying my formula @Text(StartDate)+" - "+@Text(EndDatea) in the view column
and this worked fine.

Thanks !!!!
ZvonkoSystems architectCommented:
No comment has been added lately (932 days), so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:

RECOMMENDATION: Award points to puneetfred http:#6369007
Please leave any comments here within 4 days.

-- Please DO NOT accept this comment as an answer ! --


EE Cleanup Volunteer
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.