|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Still struggeling for life with dates
I don't now it anymore now.
I created a page where you can see what's happening URL Just click on the different dates en see the results You'll see that 06/01/2004 is not working. I need to reformat the date before it is given to the query. Can show me how to do that. So the date that i have from the resultpage, that date is the date that i'm using in the hyperlink, i need to swap days and months before the query is send to the db. I hope that i'm not to confusing here. Last edited by dcarva : September 22nd, 2003 at 03:16 PM. |
|
#2
|
||||
|
||||
|
I can't get to the page...get a server not found error.
|
|
#3
|
||||
|
||||
|
This works for SQL Server, not sure about Access though...are you using Access or SQL Server? - someone else had posted this before.
(Replace DateFieldName with the name of your date field and TableName with the name of your table.) SELECT CONVERT(varchar(11), DateFieldName, 103) AS Expr1 FROM TableName |
|
#4
|
|||
|
|||
|
Attention!
Converting a date with Convert includes several options like the 103 param indicates a British/French "dd/mm/yy" date and the fact that it is > 100 means that centuries are included in the format. Therefore I recommend reading Transact SQL Help for Convert f.e. |
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > Still struggeling for life with dates |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|