1
JamesSAEP
AMS 2.41 Date Stamp format
  • 2005/7/5 21:04

  • JamesSAEP

  • Just can't stay away

  • Posts: 732

  • Since: 2005/2/28


I have created an article and the displayed creation date is 2005/7/5 and the date in the database is "1120586887".

I need to do an sql import for a few hundred articles and the date format in the sql file is "2005/7/5".

1. What format is the date in the database?

2. Is there a way to change it so I can use my sql file for importing?

Thanks.

2
Mithrandir
Re: AMS 2.41 Date Stamp format

1. A UNIX timestamp

2. not directly - however, there is a MySQL function that can be used - UNIX_TIMESTAMP("date_variable") - but if you already have that database dump, I don't know how you can add the function call to each date unless you do some processing of the to-be-imported data in PHP before inserting in the database.
"When you can flatten entire cities at a whim, a tendency towards quiet reflection and seeing-things-from-the-other-fellow's-point-of-view is seldom necessary."

Cusix Software

3
JamesSAEP
Re: AMS 2.41 Date Stamp format
  • 2005/7/5 21:12

  • JamesSAEP

  • Just can't stay away

  • Posts: 732

  • Since: 2005/2/28


Thanks Mith for the reply. I'll have to play around with it and see what I can do.

J

4
Mithrandir
Re: AMS 2.41 Date Stamp format

If you can process the data before inserting it into AMS tables, the PHP function strtotime() will convert a text date into a UNIX timestamp.
"When you can flatten entire cities at a whim, a tendency towards quiet reflection and seeing-things-from-the-other-fellow's-point-of-view is seldom necessary."

Cusix Software

5
FMule
Re: AMS 2.41 Date Stamp format
  • 2005/8/31 20:36

  • FMule

  • Just popping in

  • Posts: 37

  • Since: 2004/10/22


there is a sql string that can change from:

mysql date format aaaa-mm-dd field

to a field in witch the dormat is int (10) and the date is UNIX_TIMESTAMP ?!?!

Login

Who's Online

348 user(s) are online (60 user(s) are browsing Support Forums)


Members: 0


Guests: 348


more...

Donat-O-Meter

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

Latest GitHub Commits