This topic is locked
[SOLVED]

 Change "Long Date" to remove day of week

12/16/2019 6:58:19 PM
PHPRunner General questions
M
mhollibush author

I need to remove the "day" from the "Long Date" on the view pages.
Is there a "Before Display" option? or a source file I can change?
Example:

currently shows

Sunday, January 14, 2018
I want to remove the day of the week so it shows:
January 14, 2018
Thanks in advance

N
Nir Frumer 12/16/2019

hi

in "fields" tab ->

view as , select custom and put the following code

$value=substr($value, strpos($value,',')+2)
hope it helps

M
mhollibush author 12/16/2019



hi

in "fields" tab ->

view as , select custom and put the following code

$value=substr($value, strpos($value,',')+2)
hope it helps


I tried and it switched to short date....
I am looking for as an example:

January 12, 2018

HJB 12/17/2019

Go to CUSTOM VIEW of the date field and enter:

$value = date('F j, Y', strtotime($value) );



In regard to other "switch" options, pleez view:

https://www.php.net/manual/en/function.date.php

M
mhollibush author 12/17/2019



Go to CUSTOM VIEW of the date field and enter:

$value = date('F j, Y', strtotime($value) );



In regard to other "switch" options, pleez view:

https://www.php.net/manual/en/function.date.php


Thank you.... I was having issues getting it to work in the "custom view"

in my snippets I was able to use



$data1["date"] = date("M / d / Y ", strtotime($data1["date"]));



to get the results I needed ( Dec / 17 / 2019 )

... was having issues with the "custom view"
Appreciate your reply