The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
change time format inside of query
How can I change lastavtivity format and add to another table?
PHP Code:
|
#2
|
|||
|
|||
I think you want to use the mysql function FROM_UNIXTIME(). Here's the documentation: http://dev.mysql.com/doc/refman/5.5/..._from-unixtime
|
#3
|
||||
|
||||
Quote:
for example if I fetch query and store in variable like: $visitor[lastactivity] and then vbdate('Y-m-d', $visitor[lastactivity]) was working my problem is that i can not use it in the query |
#4
|
|||
|
|||
Quote:
I forgot that vbdate handles the timezone conversion based on a user's selecte timezone. Do you want the times to be converted for each user's timezone, or just for your own? |
#5
|
||||
|
||||
Quote:
I created a table with 3 columns : userid, dateline, date I could select userid and lastactivity from "user" table and insert to userid and dateline in this table but i want to convert lastactivity to Y-m-d format and insert into date column too |
#6
|
|||
|
|||
OK, then how about this:
PHP Code:
|
Благодарность от: | ||
mohammad6006 |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|