#mysql - Sun 11 Mar 2007 between 00:10 and 01:00

NY Lost Funds



Drstrokerif i select a row that has a date in it such as YYYY-MM-DD how would i convert that in the sql?
vice-versaDrstroker: convert it to what?
Drstrokeroh sorry a different date format
say month day year
tupauhm HOUR(mytime) ??
DAY(mytime) ??
YEAR(mytime)
Drstroker?
tupaDrstroker, maybe I didn't understand what you are trying to do
XgcDrstroker: or try DATE_FORMAT()
DrstrokerXgc: hey how ya doing!
oh i got a real challege for ya now lol
i have wanna see if this is possible, i have two tables, one table has a birthday, the other has a 1 or 0 in a column, now i want to retrieve the birthday as bday if the table has a 1 if it has a 0 i want bday to contain the string "Perfer not to say"
how possible is this in mysql?
actually i already have a soultion lol now i'm just curious
ToeBeeDrstroker: CASE
vice-versaDrstroker: what was your solution?
Drstrokeri was just going to pull both in a simple join and just use php and an if statement that if it is a 1 display it '
i was just wondering if i could do it in pure mysql
vice-versaif( showbday, Date_Format(birthday, '%d/%e/%Y'), 'Perfer not to say') as bday
actionvice-versa smacks Drstroker upside the head with a MySQL cookbook ;)
vice-versasmacks Drstroker upside the head with a MySQL cookbook ;)
ToeBeeah yeah I guess an if works too. but CASE is similar :)
case showbday when 1 then birthday else 'Prefer to not say' end
Drstrokerwait
the_wenchThe_wench taps her fingers.......
Drstrokerplease explain i am not following
ToeBeehttp://dev.mysql.com/doc/refman/5.0/en/control-flow-functions.html
Drstrokerhmm
i can't seem to get Date_Format(dob, '%b/%e/%Y') to work ...
nevermind damn comma
StuBocan you write your own routines in mysql...to use in queries
like a sum( or count( but obvoisly there already available
ToeBee!man stored procedures
the_wenchsee http://dev.mysql.com/doc/refman/5.0/en/stored-procedures.html
StuBocan you use them in queries though....to caclulte values ?
Ahilylasomeone can tell me how to use mysqlbinlog to show only a specific User...
StuBoselect thedate from Customer Where customerAge = MyFunc()
can I do that ToeBee ?
ToeBeeI would assume so but I haven't actually used stored procedures myself
Drstrokernice this works good !!! awesome thanks

Page: 2 9 16 23 30 37 

IrcArchive

NY Lost Funds