Solved

Concatenate two date fields in a View

Posted on 2001-08-08
9
689 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

726 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