Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Database Access / June 2009



Tip: Looking for answers? Try searching our database.

REALLY need SQL help! Date Formatting

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Webbiz - 26 Jun 2009 23:12 GMT
Database = SQLite

I'm really pulling my hair on this one.

Here is my current SQL statement:

"SELECT date(Date,'start of month','+1 month','-1 day') as Date, " & _
               "First(Open,ID) as Open, Max(High) as High, " & _
               "Min(Low) as Low, Last(Close,ID) as Close, 0 as
IsSwingTop1, 0 as IsSwingBtm1, " & _
               "0 as IsSwingTop2, 0 as IsSwingBtm2, Null as Delta1,
Null as Delta2, " & _
               "0 as Offset1, 0 as Offset2 FROM [" & sTable & "]
GROUP By Year, Month"

The field of concern is the Date field.

This correctly gathers data Grouped by 'month' and references each
record by the LAST DAY OF EACH MONTH.

2009-01-31
2009-02-28
2009-03-31
2009-04-30
...

However, I'd like to have the date field show up as either

mm/dd/yyyy or dd/mm/yyyy, depending on the date format of the
computer.

How is this accomplished?

Thanks in advance.

Webbiz
Webbiz - 27 Jun 2009 21:02 GMT
Found help though via the SQlite email list.

Case solved.

:-)

>Database = SQLite
>
[quoted text clipped - 32 lines]
>
>Webbiz
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.