Concatenate two date fields in a View

Hello,

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
giusepeAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
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.
Puneet
0
 
pcorreyaCommented:
giusepe,

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.

Regards
Patrick



0
 
ArunkumarCommented:
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!
-Arun
0
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.

Thanks.
Have a nice weekend !!!
Best regards
0
 
ArunkumarCommented:
Thats interesting !
0
 
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 !!!!
0
 
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 !!!!
0
 
ZvonkoSystems architectCommented:
giusepe,
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 ! --

Thanks,

Zvonko
EE Cleanup Volunteer
0
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.