You are viewing limited content. For full access, please sign in.

Question

Question

regular expression to obtain calendar quarter from date field

asked on July 30, 2014

Is there a regular expression or useful tool to obtain calendar quarter directly from a date field ?

I can create a four-pronged routing decision that looks at the "month" portion of the date and will do so if need be, but was looking for a more streamlined way to obtain this for use in a filing workflow process.

Thanks in advance.

 

cb

 

0 0

Answer

SELECTED ANSWER
replied on July 30, 2014

Regular expression can only work with data that's there, it can't do conversions. But this script seems to work for me:

 

dim d as Date = TokenReplace("%(Date)")
dim month as Integer = d.Month
dim Q as Integer = Math.Ceiling(month/3)
MsgBox(Q)

(It divides the month by 3 and rounds up to the integer value)

0 0

Replies

replied on July 30, 2014

this works.  THANKS !

 

cb

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.