Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Gestational age calculation


arnonagmon
 Share

Recommended Posts

Hello,

I am new to FMP.

I would like to calculate fetal age (time passing between two dates) using LastMenstrualPeriod field (date) and CurrentDate field (date)

The result should be expressed in weeks and days.

Thanks

Arnon

Link to comment
Share on other sites

Number of days difference = (Get(CurrentDate) - LastMenstrualPeriod)

 

Express in weeks it would be---> Floor ((Get(CurrentDate) - LastMenstrualPeriod)/7) & " weeks " & ( ((Get(CurrentDate) - LastMenstrualPeriod)/7)-Floor((Get(CurrentDate) - LastMenstrualPeriod)/7) )*7 & " days"

Link to comment
Share on other sites

Date2- Date1 results in a number representing the number of days.

 

So Get (CurrentDate) - LastMenstrualPeriod = DaysBetween, let's say.

 

If you're using a CurrentDate field it needs to be defined as Get (CurrentDate) and its storage (options, storage tab) must be set to unstored.

 

To express DaysBetween as weeks and days, Truncate (DaysBetween/7, 0) & " weeks and " & Mod (DaysBetween, 7) & " days" should do it.

 

 

Truncate throws away the decimal bits past the specified number of decimal places; 0 means "no decimal places" so you get the whole number of 1/7th of the DaysBetween.

 

Mod (short for modulo) is what we used to call "the remainder" back in grade school, the number left over when you divide by 7.

Link to comment
Share on other sites

Date2- Date1 results in a number representing the number of days.

 

So Get (CurrentDate) - LastMenstrualPeriod = DaysBetween, let's say.

 

If you're using a CurrentDate field it needs to be defined as Get (CurrentDate) and its storage (options, storage tab) must be set to unstored.

 

To express DaysBetween as weeks and days, Truncate (DaysBetween/7, 0) & " weeks and " & Mod (DaysBetween, 7) & " days" should do it.

 

 

Truncate throws away the decimal bits past the specified number of decimal places; 0 means "no decimal places" so you get the whole number of 1/7th of the DaysBetween.

 

Mod (short for modulo) is what we used to call "the remainder" back in grade school, the number left over when you divide by 7.

 

Yours is easier... using the Mod(). I always forget about that one.

Link to comment
Share on other sites

This is great,

I created a field for weeks using "Truncate (DaysBetween/7, 0)" and a field for days using (Mod (DaysBetween, 7)

Is it possible to have both results (weeks and days) in one field using one calculation?

Thanks again

Link to comment
Share on other sites

Calculation field (result text) :

Truncate ((Get (CurrentDate) - LastMenstrualPeriod)/7, 0) & " weeks and " & Mod (Get (CurrentDate) - LastMenstrualPeriod, 7) & " days"

Link to comment
Share on other sites

If this would not be 2 difficult, could you please rephrase the formula so i can use a predefined date (i.e. DateOfExamination) instead of the CurrentDate?

Thanks again

Link to comment
Share on other sites

Truncate ((DateOfExamination - LastMenstrualPeriod)/7, 0) & " weeks and " & Mod (DateOfExamination - LastMenstrualPeriod, 7) & " days"

Link to comment
Share on other sites

  • 3 weeks later...

I am in desperate need of some help on gestational age. All the calcuators I've seen are based upon LMP. I need to calculate the gestational age in weeks and days based on:

 

EDD (estimated due date-which is equivalent to being pregnant 40 weeks and 0 days) and

today's date.

 

 

Can anyone help me?

Link to comment
Share on other sites

 Share



×
×
  • Create New...

Important Information

Terms of Use