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

Question

Question

Date Format like 1st of January 2018

asked on April 29, 2018

Hi guys, i would like to check if QF able to capture date like 1st of January 2018, there are possibilities that the date will consist of "st" ,"rd and "nd" 

 

how do i go about this?

 

thanks in advance,

 

Jeff

0 0

Answer

SELECTED ANSWER
replied on May 1, 2018

You can't parse a date in that format. However if the strings are consistent, you can do a simple modification to the strings.

Use the Substitution process on your extracted date:

Once you've run the substitution, then the date should be ok to put into a date field.

1 0
replied on May 1, 2018

thanks for your suggestion, and yes i am using the same approach for now.

0 0
replied on May 2, 2018

The above is good advice. Just to make it slightly more specific, for the Replace expression you might try:

(\d{1,2})st\sof|(\d{1,2})nd\sof|(\d{1,2})rd\sof|(\d{1,2})th\sof

And for the With expression: ${1}${2}${3}${4}

This will do the substitution on only the "st of", "th of", etc. only on strings that start with one or two digits, specifically. Otherwise, the phrase "heard of" would become "hea".

1 0
replied on May 8, 2018

@Karina Good addition. I'm a developer, so my first (bad) assumption is "Why would you put anything other than a date in the date field? :)

0 0

Replies

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

Sign in to reply to this post.