473,662 Members | 2,760 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to find the Max Date from the Table

Inbaraj
76 New Member
Hi...

I have a Table in that i have inserted the DATE as VARCHAR now in that i Want to get the Max Date. I am new to MySQL Plz help me how to find the max date.

with regard
Inbaraj.D
Feb 1 '08 #1
3 2773
amitpatel66
2,367 Recognized Expert Top Contributor
Hi...

I have a Table in that i have inserted the DATE as VARCHAR now in that i Want to get the Max Date. I am new to MySQL Plz help me how to find the max date.

with regard
Inbaraj.D
Could you please show which format the datas are stored in the table as varchar?....DDM MYYYY or MMDDRR??
Feb 1 '08 #2
Inbaraj
76 New Member
Could you please show which format the datas are stored in the table as varchar?....DDM MYYYY or MMDDRR??

hi..

It is stored in the MMDDYYYY format.

with reg
Inabraj.D
Feb 4 '08 #3
mwasif
802 Recognized Expert Contributor
This query will return the desired results
Expand|Select|Wrap|Line Numbers
  1. SELECT MAX(STR_TO_DATE(varchar_date, '%m%d%Y')) FROM table
Feb 9 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

9
3204
by: Gleep | last post by:
sorry i didn't explain it correctly before my table is like this example fields: ID name username outcome date1 date2 date3 (etc..) - date15 price1 price2 price3 (etc..) I know that Mysql query order by will compare records on a specific date, but how do i compare multiple fields within the same record. Want to find the latest date within the record..
9
1905
by: Simon Harris | last post by:
Hi All, Ok - I'll confess from the start, this is more about application logic that ASP, being an ASP programmer, I guessed you people might be able to help! :) I have built a room bookings system, based on ASP/SQL Server. Bookings are stored in a table, which holds start date+time and End date+time, amougst other info. Bookings can run from 8:30 - midnight, and are always made in 30 min blocks (e.g. 14:30 - 15:30 etc)
4
6596
by: SQLJunkie | last post by:
Here is an issue that has me stumped for the past few days. I have a table called MerchTran. Among various columns, the relevant columns for this issue are: FileDate datetime , SourceTable varchar(25) SQL statement: SELECT DISTINCT FileDate
2
6435
by: Baybars | last post by:
New to access, but to deja.com. Looked through many posts, but can not find a good post for my problem (I believe there is, but my access level didn't allow me to understand). I have a table for cash flow of a shop. Forreign currencies are accepted. I built the tables accordingly: CURRENCY TYPE (USD, EURO, POUND ETC), AMOUNT OF THE CURRENCY. RATE FOR LOCAL CURRENCY and LOCAL CURRENCY VALUE. When I entered the type of currency (eg USD),...
3
2742
by: sean | last post by:
I have a table with fixed row of records SORTED by DATE using ADO pagination method. The user can click a link in one table cell and go to another page to modify the record. Once the updated record is saved the user will be redirect back to the table. This time the record updated will be highlighted so that the user knows where he came from. I basically pass the page number, column and row number via querystring and store the info in a...
67
7682
by: PC Datasheet | last post by:
Transaction data is given with date ranges: Beginning End 4/1/06 4/4/06 4/7/06 4/11/06 4/14/06 4/17/06 4/18/06 4/21/06 426/06 4/30/06 I am looking for suggestions on how to find the date ranges where there were no transactions.
1
4563
by: alan_conoco | last post by:
Hello all, I have a table looks like this in Access Product Sale Date A date A date A date B date B date
1
3962
by: shafq7 | last post by:
Hello Iam trying to find a date from table "taqrir" matching to date in unbound text box in form by this code as below: Private Sub cmdAppend_Click() Dim dbs As Database Dim rs As Recordset If IsNull(Me.M_Date) Then MsgBox "Please Enter desire Monday date first!" Else Set dbs = CurrentDb
5
1592
by: Greg (codepug | last post by:
I have a table that contains a field called RDATE (reminder date). Dates are optionally entered to remind a user of an upcoming event. I have a reminder button that launches a popup form, and a list of all the reminder fields that actually contain dates and a corresponding explanation, pops up. This is handled by a query. I created a backlight to the button that will light when a reminder date is coming up. How do I check the table on...
0
8435
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8345
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8857
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8547
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8633
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6186
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5655
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4348
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2763
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.