Previous Thread
Next Thread
Print Thread
Hop To
#35476 06/14/2003 6:06 PM
Anonymous
Unregistered
Anonymous
Unregistered
Hi All

Is there any way to change the displayed date that a post was made

Des

#35477 06/14/2003 8:14 PM
Anonymous
Unregistered
Anonymous
Unregistered
[6.3]

You could do a query like this:

UPDATE w3t_Posts SET B_Posted = FROM_UNIXTIME('2003-06-14 20:05:00') WHERE B_Number = 123456

Depending on whether it's the last post in a thread or board, you'd have to do similar updates for the main post in the thread and the board that contains the thread.

#35478 06/15/2003 2:04 AM
Anonymous
Unregistered
Anonymous
Unregistered
I am able to edit the db on my host the B_Posted is 1055548177 representing this date
14/06/03 09:49 AM

The actual date is posted 28-04-2003 07:07 PM

Is it possible to change in edit mode on the DB and do you know what the formula is

Does this make any sense

Des

#35479 06/15/2003 2:16 AM
Anonymous
Unregistered
Anonymous
Unregistered
It uses epoch time (which is the number of seconds from Jan 1 1970).

I have a little utility I wrote here:
http://www.joshuapettit.com/time.php
where you can enter a date and time and it'll give you the epoch time. <img border="0" title="" alt="[Smile]" src="images/icons/smile.gif" />
That should help you get the number you need to edit using phpMyAdmin or similar. <img border="0" title="" alt="[Smile]" src="images/icons/smile.gif" />

Josh
www.joshuapettit.com
ThreadsDev.com Administrator | InfoPop Community Moderator
Register to see my How To/Site Help Library Forum at ThreadsDev.com.
My threads 'tweaking' abilities are for hire for upgrades, tweaks and modifications.

#35480 06/15/2003 4:41 AM
Anonymous
Unregistered
Anonymous
Unregistered
Thanks Josh

To be sure: Do the conversion, edit the db, replace the number with that from the utility.

Thanks heaps.

Des

#35481 06/15/2003 6:57 PM
Anonymous
Unregistered
Anonymous
Unregistered
Hi Josh

Works a treat. Thanks very much.
Just as a matter of interest the reason I needed this was that I had imported from classic to threads (eventually solved some of the problems I was having) and the only thing that did not import was the topics. Thankfully there was only 25 or so. I logged on as the user who posted, and pasted the post and replies as the individual users but the dates were all as of the same date and time within minutes of each other. Looked ridiculous. Hence the need. In the process of correcting the dates to original and again thanks a lot.

Regards

Des

#35482 06/16/2003 12:57 AM
Anonymous
Unregistered
Anonymous
Unregistered
Glad it worked for you! <img border="0" title="" alt="[Smile]" src="images/icons/smile.gif" />

Josh
www.joshuapettit.com
ThreadsDev.com Administrator | InfoPop Community Moderator
Register to see my How To/Site Help Library Forum at ThreadsDev.com.
My threads 'tweaking' abilities are for hire for upgrades, tweaks and modifications.

#35483 08/04/2003 3:52 AM
Anonymous
Unregistered
Anonymous
Unregistered
Hello!

So, I'm needing to do the same thing with changing the dates for a couple announcement posts....

And, I guess I'm just not following the instructions well, because it's not working the way I'd like it to.. lol. Sorry for being dense...

First,
I need to run this command:
UPDATE w3t_Posts
SET B_Posted = FROM_UNIXTIME('2003-06-14 20:05:00')
WHERE B_Number = 123456

B number is the post's number, and that date string is what I want the date to turn into?

Or is there math I need to do before? I guess that's where I'm confused.

Any help would be greatly appreciated!

-peter

#35484 08/04/2003 8:26 AM
Anonymous
Unregistered
Anonymous
Unregistered
Oops, I used the wrong function in my post above. That should have been:

UPDATE w3t_Posts
SET B_Posted = UNIX_TIMESTAMP('2003-06-14 20:05:00')
WHERE B_Number = 123456

FROM_UNIXTIME() is the reverse function - it converts a timestamp into a readable date/time. It would be used for displaying an existing timestamp in the database, e.g.:

SELECT FROM_UNIXTIME(B_Posted)
FROM w3t_Posts
WHERE B_Number = 123456

With that change, it should work ok.

Reference: MySQL Date and Time Functions.

-----
UBB.threads beta tester / threadsdev.com moderator
Software consulting services including UBB.threads problem resolution / installs / upgrades / customization.

#35485 08/04/2003 1:13 PM
Anonymous
Unregistered
Anonymous
Unregistered
Whew!

Thanks a bunch Dave! It's muchly appreciated!

-peter

#35486 08/04/2003 7:03 PM
Anonymous
Unregistered
Anonymous
Unregistered
Another quick question!

What command can I run to update the postlist page ? Do I need to run something specific for each post, or something else?

The order on the postlist page is now incorrect <img border="0" title="" alt="[Wink]" src="images/icons/wink.gif" />

Thanks!

-peter

#35487 08/05/2003 9:52 PM
Anonymous
Unregistered
Anonymous
Unregistered
i think this got burried....does anyone know how to update the dates so postlist will sort/display the date/post appropriately ?

#35488 08/05/2003 10:08 PM
Anonymous
Unregistered
Anonymous
Unregistered
I saw your question, but I haven't had time to dig through the database and the scripts to provide an answer.

#35489 08/05/2003 10:35 PM
Anonymous
Unregistered
Anonymous
Unregistered
ah, gracias!


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
spam issues
by ECNet - 03/19/2024 11:45 PM
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Who's Online Now
3 members (rootman, Gizmo, Nightcrawler), 562 guests, and 186 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)