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()))
|
|
|
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 |
|
|
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!
|
|
|
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 |
|
|
|