Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

windows date

 
   Database Help (Home) -> mySQL RSS
Next:  The backup directory is invalid . . .  
Author Message
B. Verkerk

External


Since: Feb 14, 2005
Posts: 2



(Msg. 1) Posted: Mon Feb 14, 2005 6:40 pm
Post subject: windows date
Archived from groups: mailing>database>mysql (more info?)

How can I convert a windows date stored in Mysql (ie 38397 for today) to something I can use in a where clause?

Thnaks,

Bart

 >> Stay informed about: windows date 
Back to top
Login to vote
Bill Karwin1

External


Since: Jun 17, 2004
Posts: 42



(Msg. 2) Posted: Mon Feb 14, 2005 6:40 pm
Post subject: Re: windows date [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

B. Verkerk wrote:
 > How can I convert a windows date stored in Mysql (ie 38397 for today) to something I can use in a where clause?

Here's an expression that converts the value 38397 to '2005-02-14'.
Does this do what you want?

mysql> SELECT FROM_DAYS( 38397 + TO_DAYS('1899-12-30') );
+--------------------------------------------+
| FROM_DAYS( 38397 + TO_DAYS('1899-12-30') ) |
+--------------------------------------------+
| 2005-02-14 |
+--------------------------------------------+
1 row in set (0.00 sec)

Regards,
Bill K.

 >> Stay informed about: windows date 
Back to top
Login to vote
B. Verkerk

External


Since: Feb 14, 2005
Posts: 2



(Msg. 3) Posted: Tue Feb 15, 2005 3:40 pm
Post subject: Re: windows date [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

thanks!

"Bill Karwin" schreef in bericht
 > B. Verkerk wrote:
  > > How can I convert a windows date stored in Mysql (ie 38397 for today) to something I can use in a where clause?
 >
 > Here's an expression that converts the value 38397 to '2005-02-14'.
 > Does this do what you want?
 >
 > mysql> SELECT FROM_DAYS( 38397 + TO_DAYS('1899-12-30') );
 > +--------------------------------------------+
 > | FROM_DAYS( 38397 + TO_DAYS('1899-12-30') ) |
 > +--------------------------------------------+
 > | 2005-02-14 |
 > +--------------------------------------------+
 > 1 row in set (0.00 sec)
 >
 > Regards,
 > Bill K.
 >> Stay informed about: windows date 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Best way to issue hundreds of inserts/updates??? - Using mysql 4.0.23- What is the best way to execute several (hundreds of) inserts and updates? Rather than issuing tons of individual inserts and updates, can I send the strings to a text file and then have mysql do them all?? IE : query.txt insert..

MySQL freezes, brings XP machine to a grinding halt - I've been using MySQL for a while for fairly light database development on my XP machine. Currently, I am just starting a new project and have experienced some big problems with MySQL today both on my office machine and at home where running a particular...

login as user 'root' but do not have root privlages and my.. - Hi gang: I'm experiencing a problem with MySQL -- I updated MySQL from version 4.1.0 to 4.1.10 and now when I login as root it doesn't show all the databases I should have access to, nor it doesn't recognize me being logged in as root (via..

FLUSH TABLES hangs if table is locked - Using FLUSH TABLES via the C query API mysql_query() hangs if the table is locked already. That is to say, nothing prevents me from running a LOCK TABLES twice; it won't tell me "it's already locked, don't try to run a FLUSH". Anyone know ...

Tool to convert DDL in graphical diagram? - Does anyone know of a tool that will create a graphical diagram from a DDL (SQL create script)? Preferable a free open-source tool. Thanks, A
   Database Help (Home) -> mySQL All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]