Hello.
 
I'm using SQLite with a VB wrapper (dhSQLite) for VB6.
 
The following SQL string works fine for putting together a recordset where
the DATE field contains only the date of the last day of each month.
 
 
 SQLString = "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 FROM [" & sTable &
"] GROUP By Year, Month"

 
Each record represents the Open, High, Low, Close price for a complete
month, and is represented by the last day of the month.
 
So we have...
 
2009-01-31
2009-02-28
2009-03-31
2009-04-30
...
 
It is currently in the yyyy-mm-dd format.
 
The line "date(Date,'start of month','+1 month','-1 day') as Date" is what
formats the month date to be the last day of the month.
 
MY PROBLEM:
 
I would like the date format to be either (mm/dd/yyyy) or (dd/mm/yyyy)
depending on the user's system date format.
 
In the US, we use mm/dd/yyyy.
 
I'm completely lost on how to do this within the SELECT statement above.
 
Can someone suggest?
 
Thanks.
 
Webbiz
 
 
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to