CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Date Function

Print topic Send  topic

Author Message
lneisius

Posts: 29
Posted: 02/26/2004, 8:10 AM

I need to use the following asp function bu need the four digit year, can someone help with getting this to produce ?/?/???? instead of ?/?/??.

DateSerial(Year(Now()), Month(Now()), Day(Now()))
View profile  Send private message
peterr


Posts: 5971
Posted: 02/26/2004, 1:53 PM

I juts tried it and this function shows 4-digit year on my computer: 2/26/2004

Possibly change your computer's regional settings if you really need to use that asp function.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
DonB
Posted: 02/26/2004, 2:09 PM

If you are using this in a form field, you can type in mm/dd/yyyy or
m/d/yyyy or dd/mm/yyyy, etc. into the Format field property. Even though
these don't appear in the dropdown list you can type in your own format
string.

--
DonB

http://www.gotodon.com/ccbth


"lneisius" <lneisius@forum.codecharge> wrote in message
news:6403e1a5ac4e9a@news.codecharge.com...
> I need to use the following asp function bu need the four digit year, can
someone help with getting this to produce ?/?/???? instead of ?/?/??.
>
> DateSerial(Year(Now()), Month(Now()), Day(Now()))
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

lneisius

Posts: 29
Posted: 02/27/2004, 4:18 AM

I'm using it in a query and not actually using now() as part of the function but getting the same results. If I use Year(Now()) I get a four digit year but in the dateserial function I get a two digit year. I did change the regional settings and got what I wanted but what if the server is set the same way then I can't change it, how do I get the four digit year in the function when on the server?

Thanks for the tip on regional settings!
View profile  Send private message
peterr


Posts: 5971
Posted: 02/27/2004, 5:21 PM

Try setting LCID:
http://www.w3schools.com/asp/prop_lcid.asp

_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.