SunQuest
           ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old September 25th, 2003, 03:08 AM
icepricessa's Avatar
icepricessa icepricessa is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 199 icepricessa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 10 m 38 sec
Reputation Power: 5
Question date format display gone wrong

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

Reply With Quote
  #2  
Old September 25th, 2003, 09:55 AM
nopoints nopoints is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Windsor ON, Canada
Posts: 459 nopoints User rank is Corporal (100 - 500 Reputation Level)nopoints User rank is Corporal (100 - 500 Reputation Level)nopoints User rank is Corporal (100 - 500 Reputation Level)nopoints User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 13 h 44 m 22 sec
Reputation Power: 8
what exactly are you passing to this function?
__________________
Programmer's Corner

Reply With Quote
  #3  
Old September 25th, 2003, 03:23 PM
R2D2 R2D2 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Third chipset next to the master jumper...
Posts: 16 R2D2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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)

Reply With Quote
  #4  
Old September 27th, 2003, 07:21 AM
gintom gintom is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Essex, UK
Posts: 164 gintom User rank is Private First Class (20 - 50 Reputation Level)gintom User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 17 h 16 m 46 sec
Reputation Power: 5
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > date format display gone wrong


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway