Author |
Topic |
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 11 August 2002 : 18:35:08
|
DatePart("d",strForumTimeAdjust) & "-" & Monthname(DatePart("m",strForumTimeAdjust))
this could be 11th of august or 8th of November so you could be using cdate on the wrong date |
MVC .net dev/test site | MVC .net running on Raspberry Pi |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 11 August 2002 : 19:00:03
|
Well I thought DatePart also used system date settings. I haven't seen a reference to that in MSDN, though, but nevertheless DatePart is also used in my own version.
|
Snitz 3.4 Readme | Like the support? Support Snitz too |
|
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 11 August 2002 : 19:32:20
|
The value in strForumTimeAdjust is date Data Type.
From config.asp
strForumTimeAdjust = DateAdd("h", strTimeAdjust , Now())
quote: Huwr:
DatePart("d",strForumTimeAdjust) & "-" & Monthname(DatePart("m",strForumTimeAdjust))
this could be 11th of august or 8th of November so you could be using cdate on the wrong date
No. The day and month will always be picked correctly as all date functions will be processed on the same server. Neither Ruirib nor mine function will fail.
quote: HUWR: I have seen them saved as YYYYDDMMHHMMSS
That was happening in function ReadLasthereDate and I remember that was also discussed in my earliest discussions on Date Swapping.
quote: HUWR: you will get a different result for monthname depending on the server because datepart 'm' will not be the same, hence the reason ruirib compares an actual date to see whether the function returns it as the correct month or not
DatePart("m",strForumTimeAdjust) and Month(strForumTimeAdjust) Both will always return the same value. They are processed on the same server. ruirib uses the "Month" function to get the month number.
quote: ruirib: Besides the elegance of the solution, I think the differences between both are minimal. StrToDate doesn't get called that many times to make a significative difference in performance, the extra call to strComp and the additional if "my" function adds.
The performance gain will not be noticeable because both take very small time in processing. However I did a For Next with 500 iterations on both the logics, mine completed in less than 50% of time as compared to ruirib's function. But since the total amount taken was too low in both cases. So performance gain is minimal in terms of total time.
quote: ruirib: Since both DatePart and cDate use the server date and time settings, I think this time Gaurav's suggestion really works. I also think it's a more elegant solution and I like elegant solutions.
|
CSS and HTML4.01 Compilant Snitz Forum . ForumSquare . Rakesh Jain
It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Prayer Of Forgiveness "I forgive all living beings. May all living beings forgive me! I cherish the friendliness towards all and harbour enmity towards none." -- Aavashyaka Sutra(Translated) |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 11 August 2002 : 20:30:03
|
How did it break the events Mod. I am using it with events Mod and I have not noticed any problems. Can you please post some details. Thanks |
CSS and HTML4.01 Compilant Snitz Forum . ForumSquare . Rakesh Jain
It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Prayer Of Forgiveness "I forgive all living beings. May all living beings forgive me! I cherish the friendliness towards all and harbour enmity towards none." -- Aavashyaka Sutra(Translated) |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 11 August 2002 : 20:59:53
|
when I went to creat a new event it was swapping the month and day, so rather than create one for the 9th of aug it created one for the 8th of september.
But then the event calendar is infamous for behaving oddly with dates |
MVC .net dev/test site | MVC .net running on Raspberry Pi |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 11 August 2002 : 21:30:17
|
HUWR, I tried to add an event for 9-Aug-2002 at your magicmushrooms site. For the event on 9-Aug-2002 it shows Starts: 12/8/2002 2:26:50 Ends: 12/08/2002
There are some problems with date picker, I will post at your site. |
CSS and HTML4.01 Compilant Snitz Forum . ForumSquare . Rakesh Jain
It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Prayer Of Forgiveness "I forgive all living beings. May all living beings forgive me! I cherish the friendliness towards all and harbour enmity towards none." -- Aavashyaka Sutra(Translated) |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 12 August 2002 : 05:08:59
|
ruirib, What you have to remember, is my site has a timezone mod, so dates behave a little differently sometimes, and this may end up in v4.
gaurav, thanks for the heads up, will look at it later |
MVC .net dev/test site | MVC .net running on Raspberry Pi |
|
|
mortioli
Average Member
United Kingdom
898 Posts |
Posted - 20 August 2002 : 14:26:11
|
Not sure if this is part of this, but when I click on the Birth Date link in Edit Profile, the pop-up box appears, and I get this error on the right:
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'strCurrentDate'
/cky/forum/pop_datepicker.asp, line 382
I apologise if this has already been covered |
|
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 20 August 2002 : 20:15:05
|
no, this is a problem in the pop_datepicker.asp file itself. It doesn't use the main forum functions because the date isn't stored with a time, just YYYYMMDD. I was trying to make it as date non-dependent as possible, but that didn't work out. |
|
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 20 August 2002 : 20:32:06
|
Richard, I have fixed the datepicker. It works okay now. The Other Topic is locked so, I can not post in there. I also sent you an email using the link from your profile. |
|
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 20 August 2002 : 20:39:36
|
since it was taking too long to fix, I just removed it and replaced it with dropdown boxes to pick the month/day/year for your birthday. Date checking is done after the form is submitted to make sure that the date entered is valid (no February 31 for example). |
|
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 20 August 2002 : 20:50:18
|
Well, as I said, It is fixed, so it is upto you. |
|
|
Topic |
|