MarcomCentral (PTI) and FusionPro User Communities

MarcomCentral (PTI) and FusionPro User Communities (
-   The JavaScript Library (
-   -   Date error (

rrdwitt April 4th, 2019 03:42 PM

Date error
1 Attachment(s)
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.


sschardan April 5th, 2019 07:01 AM

Re: Date error
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");

rrdwitt April 5th, 2019 07:23 AM

Re: Date error
Thank you, I will give it a try. Privacy in mind, are you someone I used to work with? Your user name sounds familiar :)

sschardan April 5th, 2019 07:30 AM

Re: Date error
You are welcome. And privacy in mind, yes.

All times are GMT -7. The time now is 12:41 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.