Re: [Templates] mysql date parsing
[prev]
[thread]
[next]
[Date index for 2004/07/01]
>it DOES store the timestamp in unix seconds. What it doesn't do
>it emit the raw unix time... and the UNIX_TIMESTAMP wrapped
>around it quite simply dumps the raw integer value of the timestamp.
Ahhhhh! Mark, I see a discussion of UNIX_TIMESTAMP in the mysqsl manual:
"If UNIX_TIMESTAMP() is called with a date argument, it returns
the value of the argument as seconds" " date may be a DATE string,
a DATETIME string, a TIMESTAMP...."
Gosh, I think I'm about to learn something here. (I hope!)
Here's my query:
SELECT apps.emp_fname,apps.emp_mname,apps.emp_lname,apps.emp_email,
apps.emp_phone,apps.company,apps.status,apps.city,apps.state,
roles.rolesym,apps.suppcompanies,apps.timestamp
FROM apps,roles
WHERE apps.role = roles.roleid AND apps.active = '1'
ORDER BY apps.emp_lname
Timestamp is described thus:
TIMESTAMP(14)
When I print the value of [% app.timestamp %] I see timestamp values
in format YYYYMMDDHHMMSS.
>The way to fix the output of SQL is with SQL.
I'm with you; I'd much rather keep it simple, use what's at hand.
I need to learn how.
Sooooo close. Now I'm trying to figure out how to feed the value in
apps.timestamp to UNIX_TIMESTAMP()
This does not work:
SELECT apps.emp_fname,apps.emp_mname,apps.emp_lname,apps.emp_email,
apps.emp_phone,apps.company,apps.status,apps.city,apps.state,
roles.rolesym,apps.suppcompanies,UNIX_TIMESTAMP(apps.timestamp)
FROM apps,roles
WHERE apps.role = roles.roleid AND apps.active = '1'
ORDER BY apps.emp_lname
Can you help me through?
Moocho apprecianatto,
/dennis
_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates
 |
(message missing)
|
 |
 |
Re: [Templates] mysql date parsing
Dennis Daupert 20:00 on 01 Jul 2004
|