473,498 Members | 2,021 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

windows date

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
Jul 23 '05 #1
2 1096
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.
Jul 23 '05 #2
thanks!

"Bill Karwin" <bi**@karwin.com> schreef in bericht news:cu*********@enews4.newsguy.com...
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.

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3278
by: Fons Dijkstra | last post by:
Hello, I'm using the mx.ODBC.Windows package in order to read/write a MSAccess database. Everything works fine apart from the DATE format handling. I'm using the default "datetimeformat" (i.e....
5
7138
by: Eric Chong | last post by:
I created a Windows Service in C# that requires to get passed command arguments like a Console App. I noticed that there is an option "Start parameters" text box in the property of a Windows...
2
15203
by: Ken Lindner | last post by:
I have a need to become familiar with SQL Server 2000 for work. Needless to say I am new to SQL Server any version, but not IT in general. My employer has provided me with the SQL Server 2000...
8
4159
by: Bill Sonia | last post by:
I've written a Windows Service to send e-mails on events like OnStart, OnStop, OnShutDown using System.Web.Mail. It works for everything but OnShutdown. My guess is that for OnShutDown, once my...
0
1365
by: lanky_tx | last post by:
Hi All, I am trying to acess the rows within a child table of a windows form datagrid. I have tried using the CurrencyManager & BindingManagerBase to get the data but doesn't work. The...
0
1401
by: Luis Esteban Valencia | last post by:
Hi, I am using windows 2000 Pro with SP4 for development and database is access2000. Regional Setting is as follows: Regional Options: Your locale(location): English United States short date...
2
11076
by: Ryanfai | last post by:
I use the vb.net make the program that save the date and any Information field. when I input the date in textbox then I save to database occurs error that is "Cast from string "20/08/2003" to...
3
1921
by: Trevor | last post by:
This is driving us mad - please help! Back in 2003, I coded a Windows Service in VB.NET for framework v1.1.4322. I deployed it in Nov. 2003, and it worked fine until the end of May 2005, when it...
2
2436
by: Trevor | last post by:
Argh! This problem is driving me nuts! Can you help? In November of 2003, I installed a web service on Windows Server 2003 built in VB.NET for v1.1.4322 of the framework. It contains a timer...
1
6494
by: schouwla | last post by:
Hi, I want to create dates in the following format: dd-MMM-yyyy e.g. 13- Mar-2007 But are seeing some problems when running on a Japanese Windows XP. Regional settings are set to JP. ...
0
7121
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6993
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7162
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7375
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4584
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3088
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
650
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
287
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.