The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Date format dd/mm/yyyy

3 posters

Go down

In progress Date format dd/mm/yyyy

Post by BilliB October 21st 2012, 12:52 pm

How do i change the date format in the members profile yyyy/mm/dd when the date format in registration is correct ie dd/mm/yyyy?
avatar
BilliB
Forumember

Male Posts : 26
Reputation : 0
Language : English
Location : Australia

Back to top Go down

In progress Re: Date format dd/mm/yyyy

Post by Sanket October 21st 2012, 1:39 pm

General>Forum>Configuration
Date format :
Sanket
Sanket
ForumGuru

Male Posts : 48766
Reputation : 2830
Language : English
Location : Mumbai

Back to top Go down

In progress Not quite

Post by BilliB October 21st 2012, 1:59 pm

Thank you for the advice but my problem maybe be a little deeper.

When a new member enters (eg: his birth date) as dd-mm-yyyy that is ok. Correct.
but then it shows up in his/her profile the date format is yyyy-mm-dd. How can I change it to the original format as entered. dd-mm-yyyy.
avatar
BilliB
Forumember

Male Posts : 26
Reputation : 0
Language : English
Location : Australia

Back to top Go down

In progress Re: Date format dd/mm/yyyy

Post by Sanket October 21st 2012, 7:47 pm

Profile>Preferences tab
Date format :
Have you changed it there?
Sanket
Sanket
ForumGuru

Male Posts : 48766
Reputation : 2830
Language : English
Location : Mumbai

Back to top Go down

In progress Date format dd/mm/yyyy

Post by BilliB October 22nd 2012, 3:17 am

Sanket wrote:Profile>Preferences tab
Date format :
Have you changed it there?

I have tried simple & advanced options in all categories but can't find >> "Profile>Preferences tab
Date format :" is there something before profile eg general or display.?? blackeye
avatar
BilliB
Forumember

Male Posts : 26
Reputation : 0
Language : English
Location : Australia

Back to top Go down

In progress Re: Date format dd/mm/yyyy

Post by SLGray October 22nd 2012, 3:23 am

The profile button that is in the navigation menu (not in the administration panel) under the main forum's logo/banner.


Date format dd/mm/yyyy Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51463
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

In progress Re: Date format dd/mm/yyyy

Post by BilliB October 22nd 2012, 5:18 am

slg wrote:The profile button that is in the navigation menu (not in the administration panel) under the main forum's logo/banner.

Totally lost. Here is my forum URL: http://rancooksonline.techno-zone.net/
This format is in the edit profile menu
Date of Enlistment *:
Day Month Year
Date of Discharge *:
Day Month Year
This is the viewing profile window.
Date of Enlistment *: 1962-06-03 should or i would like it to be : dd-mm-yyyy
Date of Discharge *: 1974-06-02

Pretty please could you step me through this step by step. I am not quite dumb but I am an ex aussie navy cook.


Last edited by BilliB on October 26th 2012, 5:01 am; edited 1 time in total
avatar
BilliB
Forumember

Male Posts : 26
Reputation : 0
Language : English
Location : Australia

Back to top Go down

In progress Re: Date format dd/mm/yyyy

Post by SLGray October 22nd 2012, 6:55 pm

I mean the Profile button that is in the navigation menu.

For example on the support forum:
Home Portal FAQ Search Create a free forum Memberlist Usergroups Profile You have no new messages
After pressing the button, press the Preferences tab.
Look for this -
Date format: (It should be the very last thing at the bottom.)


Date format dd/mm/yyyy Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51463
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

In progress Re: Date format dd/mm/yyyy

Post by BilliB October 23rd 2012, 1:04 pm

I have followed what you have suggested but I think we are way off line. What you have said is for the Display date format, Current date/time is Tue 23 Oct 2012 - 8:30 is shown on the top of each page which should be the current time where the member is residing. (that has a problem but I will worry about another time)

Please read my previous reply and I am sure you will see what I am saying is what I need fixed...

I would like the date format in the member profile to read as: dd-mm-yyyy NOT yyyy-mm-dd
avatar
BilliB
Forumember

Male Posts : 26
Reputation : 0
Language : English
Location : Australia

Back to top Go down

In progress Re: Date format dd/mm/yyyy

Post by SLGray October 23rd 2012, 8:50 pm

I believe the date format in the profile can not be changed.


Date format dd/mm/yyyy Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51463
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

In progress Re: Date format dd/mm/yyyy

Post by BilliB October 24th 2012, 4:07 am

Rideem3 wrote:SLG is correct. You can't change it via normal means.

However you can change it with JavaScript. Go to Admin Panel -> Modules -> JavaScript Codes management -> Make sure it's activated -> Create new -> Select in all pages -> Title it whatever you want -> Paste:
Code:
if (/\/?u\d+/.test(window.location.pathname)) {
$(function() {
if (document.getElementById('field_id-12')) {
document.getElementById('field_id-12').innerHTML = document.getElementById('field_id-12').innerHTML.replace(/(\d+)-(\d+)-(\d+)/, '$2-$3-$1');
}
});
}

I have followed your instructions and still no go. The area I am checking for correct format (dd-mm-yyyy) is the "View Profile" page all other areas are ok. The input profile is ok. Any suggestions?
examples:
Date of Enlistment *: 1962-06-03
Date of Discharge *: 1974-06-02

If I try to edit the format is changes to the correct entry format:
Date of Enlistment *:
Day Month Year Validate

Date of Discharge *:
Day Month Year Validate
avatar
BilliB
Forumember

Male Posts : 26
Reputation : 0
Language : English
Location : Australia

Back to top Go down

In progress Re: Date format dd/mm/yyyy

Post by BilliB October 24th 2012, 5:44 am

Update on progress....

Thank you for the Birthday format that is now ok after I changed the last part of the code around ('$2-$3-$1') to '$3-$2-$1') and it now gives me dd-mm-yyyy. Thank You.

However the other dates need fixing. The other date formats are dates added to the profile as needed and are not standard code as the example above and are not "* = Special fields". I can only assume that their is only one more JavaScript file needed. Your help is greatly appreciated.

HELP!. Is there anyone out there who can help me.


Last edited by BilliB on October 25th 2012, 2:33 am; edited 4 times in total (Reason for editing : wrong information - amended)
avatar
BilliB
Forumember

Male Posts : 26
Reputation : 0
Language : English
Location : Australia

Back to top Go down

In progress Re: Date format dd/mm/yyyy

Post by BilliB October 26th 2012, 3:24 am

I have set "user profile" to allow guests.
doesn't work

I have tried to open up for you but there are too many changes, however I have created a guest membership for you but I won't post it here. If you allow me I can PM you the user name & password plus the URL.
Is that OK.? I don't know what else to do.

Does this help? These are the only date formats that need changing....
View Profile Information
Date of Enlistment*: 1962-06-03
Date of Discharge*: 1974-06-02
Birthday *: 07-04-1945 correct format
Join date: 2010-04-24

Registration Information
Date of Enlistment *: Day 3 Month 6 Year
Date of Discharge *: Day 3 Month 6 Year

Q: Is there a way for me to examine the source code and change as before.... ('$2-$3-$1') to '$3-$2-$1')

With my limited knowledge of writing code I am sure this format is used throughout the program.

I also wonder if I have the latest version as I followed you instructions to go ..... "Special Permissions" but my site says.... "Special Rights". Maybe it is on a word.?
avatar
BilliB
Forumember

Male Posts : 26
Reputation : 0
Language : English
Location : Australia

Back to top Go down

In progress Re: Date format dd/mm/yyyy

Post by BilliB October 27th 2012, 6:40 pm

Rideem3,
I have given you full admin control.
avatar
BilliB
Forumember

Male Posts : 26
Reputation : 0
Language : English
Location : Australia

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum