Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Concatenate two date fields in a View

Posted on 2001-08-08
9
Medium Priority
?
701 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
8 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 100 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
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!

 

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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses

782 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