Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get max date
Message
From
06/07/2017 07:23:36
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
06/07/2017 05:08:09
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01652423
Message ID:
01652490
Views:
61
>>>Sir I am trying to get maximum date from smalldatetime column
>>>For this I am using this command
>>>
>>>
>>>select  max(convert(varchar(10),vou_date,103))as max_date from payments
>>>
>>>
>>>but it is not showing correct date.
>>>
>>>Please see attachment
>>>
>>>Thanks
>>
>>
>>select  max(vou_date) as max_date from payments
>>
>>
>>PS: I don't know why but when I saw your question, I didn't see that Martina already replied.
>
>Thanks Martina, Now your query shows this result
>2017-07-05
>
>Sir I need your little more help
>
>How to convert 2017-07-05 to 05-07-2017 (British date)?
>
>Please help

It is just a display format. Set your display format to DMY (it does not need to be British nor should be, it is just one of the countries in Europe using that same DMY format). Depending on where you want to use it, there are already supplied format specifiers. i.e.. With a textbox you could set DateFormat property to 11 (DMY). To convert to say character, you can SET DATE TO DMY and SET CENTURY ON, then simply use DTOC().
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform