Calculated field resulting in a Date

3,366 views
Skip to first unread message

Morel, Elena M

unread,
Jul 1, 2015, 5:12:02 PM7/1/15
to lifespan-r...@googlegroups.com

Hello,

 

I am a new REDCap user from Women & Infants and I want to create a calculated date field that returns a date format result, is this possible in REDCap?

 

For example:

 

Develop a date field that results in 2 weeks prior to a [consent_dt] and two weeks after:

 

I tried to develop a formula along these lines but got an error:

 

([consent_dt],”dd”,”mdy”)+14)

 

Thank you for your support.

 

 

Elena Morel, MBA

Database Administrator

Division of Research

Women & Infants Hospital

101 Dudley Street

Providence, RI 02905

Phone: 274-1122, ext 48542

Emo...@WIHRI.org




This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual
or entity to whom they are addressed. If you are not the intended recipient, you are hereby notified
that any disclosure, copying, distribution or taking of any action in reliance on the information contained in
this e-mail is prohibited. If you have received this e-mail in error, please notify sender by reply e-mail and
delete this message and any attachment(s) immediately. Thank you for your consideration in this matter.

Gobin, Polly (Asi)

unread,
Jul 1, 2015, 8:38:12 PM7/1/15
to Morel, Elena M, lifespan-r...@googlegroups.com

Hi Elena,

 

The FAQ explains that what you are hoping to do is not possible in REDCap:

 

Q: Can I calculate a new date by adding days / months / years to a date entered (Example: [visit1_dt] + 30days)?

No. Calculations can only display numbers.

 

Best,
Polly

--
You received this message because you are subscribed to the Google Groups "Lifespan Redcap Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lifespan-redcap-...@googlegroups.com.
Visit this group at http://groups.google.com/group/lifespan-redcap-users.
For more options, visit https://groups.google.com/d/optout.

Tom Küffer

unread,
Mar 20, 2023, 5:11:51 AM3/20/23
to Lifespan Redcap Users
Hi all,

An old issue, I know, but a relevant one nevertheless.
Is there an update on the possibility of displaying dates from calculations?

Best,
Tom

Jacob Buckley Lennox

unread,
May 25, 2023, 12:36:01 AM5/25/23
to Lifespan Redcap Users
Hey all,

I found a workaround that works for me.

In my situation, I wanted to add 7 days to a date to identify the expected completion date for an instrument and then display this in a table. To do this I:
1. Made a textbox field with the validation set to date;
2. In the Action Tags / Feidl Annotation box I entered '@CALCDATE([1d_self_report]][panas_date_survey], 7, 'd');
3. In a table I embedded this field

Hope that helps :)

Regards,
Jacob

Samuel Waiguru

unread,
Jul 8, 2023, 11:32:59 PM7/8/23
to Lifespan Redcap Users
Thank you, Jacob. This has helped me a big deal. 
Reply all
Reply to author
Forward
0 new messages