Solved

Concatenate two date fields in a View

Posted on 2001-08-08
9
682 Views
Last Modified: 2013-12-18
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
0
Comment
Question by:giusepe
9 Comments
 
LVL 1

Expert Comment

by:pcorreya
ID: 6366438
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
 
LVL 9

Expert Comment

by:Arunkumar
ID: 6368134
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
 

Accepted Solution

by:
puneetfred earned 25 total points
ID: 6369007
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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

Author Comment

by:giusepe
ID: 6372925
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
 
LVL 9

Expert Comment

by:Arunkumar
ID: 6372933
Thats interesting !
0
 

Author Comment

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

Thanks !!!!
0
 

Author Comment

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

Thanks !!!!
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 10476372
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

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

809 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