xoops forums

mjoel

Quite a regular
Posted on: 1/31 4:47
mjoel
mjoel (Show more)
Quite a regular
Posts: 272
Since: 2006/12/9
#1

Help with extcal mysql table

Hello XOOPS

Im using a modified extcal module ..where i dont want to set time and i want to use only date for event....i would like to update my existing extcal database ...

so that event_start and event_end field of extcal module to have 00:00:00 time

as example from 2012-11-14 08:00:00 to 2012-11-14 00:00:00

the problem is in extcal event_start and event_end are originally in int format

SELECT `event_start`,`event_endFROM `xxx_extcal_event`

Resized Image

i use this query to convert event start and event end to a readable date using this query

SELECT FROM_UNIXTIME(`event_start`),FROM_UNIXTIME(`event_end`) FROM `xxx_extcal_event`

Resized Image


i tried something like to update the time but its not working
UPDATE `xxx_extcal_eventSET FROM_UNIXTIME(`event_start`)=concat(FROM_UNIXTIME(`event_start`), ' 00:00:00'), FROM_UNIXTIME(`event_end`)=concat(FROM_UNIXTIME(`event_end`), ' 00:00:00')


after update event_start and event_end should be back in int format

how do i do this help.. im using phpmyadmin

Mamba

Moderator
Posted on: 2/3 1:38
Mamba
Mamba (Show more)
Moderator
Posts: 10676
Since: 2004/4/23
#2

Re: Help with extcal mysql table

You might check out these links:
https://stackoverflow.com/questions/77 ... set-time-in-php-to-000000
https://stackoverflow.com/questions/36 ... to-utc-midnight-using-php
https://stackoverflow.com/questions/85 ... mestamp-round-to-midnight

Maybe they will help you...
Support XOOPS => DONATE
Use 2.5.9 | Docs | Modules | Bugs