1
mjoel
Help with extcal mysql table
  • 2019/1/31 4:47

  • mjoel

  • Quite a regular

  • Posts: 325

  • Since: 2006/12/9


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

2
Mamba
Re: Help with extcal mysql table
  • 2019/2/3 1:38

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


You might check out these links:
https://stackoverflow.com/questions/7768716/set-time-in-php-to-000000
https://stackoverflow.com/questions/36371687/how-to-convert-date-to-utc-midnight-using-php
https://stackoverflow.com/questions/8550236/unix-timestamp-round-to-midnight

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

Login

Who's Online

158 user(s) are online (82 user(s) are browsing Support Forums)


Members: 0


Guests: 158


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits