Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Date Problem


Message #1 by "Joe" <bugmania76@y...> on Sun, 8 Sep 2002 10:27:22
Hi guys, currently i'm using
FormatDateTime(rs.Fields.Item("effective_date").Value, 2) 
to display date in this format dd/mm/yyyy
but it seems that when the dd field always show a digit,
e.g. it will show 1/01/2002 instead.

Is there anyway i can force it to display 01/01/2002??

Thanks in advance,
Joe
Message #2 by Berkay Mese <berkaymese@y...> on Sun, 8 Sep 2002 04:43:15 -0700 (PDT)
 Joe,
 If the records are gotten from a vb application then 
 you may use for ex:
 Format$("01/01/2002", "dd mm yyyy"), in VB.
 Here the expression uses default date seperator in 
 your regional settings.Uses "." if it is or whatever.

 2.nd solution; 
 Use the directive below,at the beginning of your
page.
 This sets the page locale to English-United States,
 <%@LCID=2057%>

 Anywhere in the scope of application, you may change 
 the value for your need, as
 Responce.LCID = (Your LCID) '1033:United States,for
ex
 
 You can use Turkish LCID (1055, it uses "." as date 
 seperator, for ex)

 You can get the exact list of LCID from MS site,
 http://msdn.microsoft.com/library/default.asp?
 url=/library/en-us/script56/html/vsmscLCID.asp

 Berkay

 
--- Joe <bugmania76@y...> wrote:
> Hi guys, currently i'm using
>
FormatDateTime(rs.Fields.Item("effective_date").Value,
> 2) 
> to display date in this format dd/mm/yyyy
> but it seems that when the dd field always show a
> digit,
> e.g. it will show 1/01/2002 instead.
> 
> Is there anyway i can force it to display
> 01/01/2002??
> 
> Thanks in advance,
> Joe


__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com
Message #3 by "Joe" <bugmania76@y...> on Mon, 9 Sep 2002 07:41:46
Thks for the Info!!

Joe

> 
 Joe,
 If the records are gotten from a vb application then 
 you may use for ex:
 Format$("01/01/2002", "dd mm yyyy"), in VB.
 Here the expression uses default date seperator in 
 your regional settings.Uses "." if it is or whatever.

 2.nd solution; 
 Use the directive below,at the beginning of your
page.
 This sets the page locale to English-United States,
 <%@LCID=2057%>

 Anywhere in the scope of application, you may change 
 the value for your need, as
 Responce.LCID = (Your LCID) '1033:United States,for
ex
 
 You can use Turkish LCID (1055, it uses "." as date 
 seperator, for ex)

 You can get the exact list of LCID from MS site,
 http://msdn.microsoft.com/library/default.asp?
 url=/library/en-us/script56/html/vsmscLCID.asp

 Berkay

 
--- Joe <bugmania76@y...> wrote:
> Hi guys, currently i'm using
>
FormatDateTime(rs.Fields.Item("effective_date").Value,
> 2) 
> to display date in this format dd/mm/yyyy
> but it seems that when the dd field always show a
> digit,
> e.g. it will show 1/01/2002 instead.
> 
> Is there anyway i can force it to display
> 01/01/2002??
> 
> Thanks in advance,
> Joe


__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

  Return to Index