Jump to content

Recommended Posts

Posted

Hello all, I have tried the Format date function and several others but

I cannot get the date formatted correctly. Seems a fairly simple rule but his one is not working. The number coming in is "01252020" I would like it to read January, 25 2020. But I keep getting the attached error.

 

Thanks

dateerror.jpg.df25ed00a5e0939aa69d241221387bbc.jpg

Posted

I'm sure there is a more concise way to do this, but this works:

 

var month = Left(Field("date"), 2)

var day = Left((Right(Field("date"), 6)), 2)

var year = Right(Field("date"), 4)

 

return FormatDate((month + " " + day + " " + year), "lm d, yyyy");

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...