Start a new topic

Reg ex to remove timestamp from date for Australian date format e.g. DD-MM-YYYY

Hi there,

Can anyone help me with a Reg ex to remove the timestamp from a date. I have found one in the forums but it doesn't work for me as I need it for the date format DD-MM-YYYY.

Good morning, 

I have had this same issue and the best solution for me was to save the file that you want to import as a .CSV file. Excel automatically adds the timestamp, but saving as a .CSV file removes it. and then you can format the date the way you want it imported without a regular expression. 

You can find the solution in the knowledge base: 'Invalid Fuzzy Date' exception when importing from .xls and .xlsx files.

I hope this helps. 

1 person likes this

Hi Gemma, Thanks for your help. I have tried your suggestion but think I must have something wrong or missing. Could you take alook?


Assuming your date@time format is consistent here is a different way to look at it.  Instead of 'stripping the time', while don't you 'keep the date'.


1 person likes this

That's great! Thank you for your help, Dennis.

One of these days I will have to put some time aside to learn more about regular expressions :)

Hi Gemma, try this:

Replacement Value: $

Value to Match On: (?<=\d+-\d+-\d+\s+).*

RegEx on

Then a second line in the dictionary that is 

Replacement Value $2-$1-$3

Value to match on ^(\d{1,2})/(\d{1,2})/(\d{4})

RegEx On

Let me know if that does the trick.

Login to post a comment