|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now! |
|
#1
|
||||
|
||||
|
hi there i have a form value which accepts the date format in the dd/mm/yyyy
and i have this function to display the date in that format Dim ddate, ydate, mdate Function CheckDate(sdate) ddate=day(sdate) mdate=month(sdate) ydate=year(sdate) sdate= ddate & "/" & mdate & "/" & ydate checkdate = sdate End Function it works fine except if the month is more then 10 or less then 5 for example if i put 10 april 2003(10/04/2003) i get 04/10/2003 and if i were to put 4 october 2003(4/10/2003) i'll get 10/4/2003 pls help thanks in advance ![]() |
|
#2
|
|||
|
|||
|
what exactly are you passing to this function?
__________________
Programmer's Corner |
|
#3
|
|||
|
|||
|
You could use the datepart function and format the date like ever you want
'Simply change the DATE by your own date value... dtDate = DATEPART("YYYY", DATE) & "/" & DATEPART("M",DATE) & "/" & DATEPART("D", DATE) |
|
#4
|
|||
|
|||
|
I had this problem too, the date was showing an american format, I tried all the formatting of the date but nothing worked.
I then found out by chance that it could be something to do with the reginal settings on the server. As i was using brinkster to test my site (american setting's) my site was showing the american format MM/DD/YY. So I tried it on the server that I was going to host it on and they had british settings so the date was coming out how they should DD/MM/YY. Hope this is some help |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > date format display gone wrong |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|