![]() |
| |||||||
![]() | « Previous Thread | Next Thread » |
| | LinkBack | Thread Tools | Display Modes |
| ||||
| Syntax - DatePart(Interval, Date, FirstDayofWeek, FirstWeekofYear) Interval - The Interval argument designates the the type of time interval. Date - The Date argument is the date and time you designate. FirstDayofWeek - The FirstDayofWeek argument must only use the constants or values defined below in the Date And Time CONSTANTS. FirstWeekofYear - The FirstWeekofYear argument must only use the constants or values defined in the Date And Time CONSTANTS which are listed above. The DatePart function returns the designated part of the date. Possible interval settings: YYYY -Year Q - Quarter M - Month Y - Day Of Year D - Day W - WeekDay WW - Week Of Year H - Hour N - Minute S - Second CONSTANT, VALUE, DESCRIPTION VBSunday, 1, Sunday VBMonday, 2, Monday VBTuesday, 3, Tuesday VBWednesday, 4, Wednesday VBThursday, 5, Thursday VBFriday, 6, Friday VBSaturday, 7, Saturday VBFirstJan1, 1, Week of January 1 VBFirstFourDays, 2, First week of the year thathas at least four days VBFirstFullWeek, 3, First full week of the year VBUseSystem, 0, Use the date format of the computer's regionsl settings VBUseSystemDayOfWeek, 0, Use the first full day of the week as defined by the system settings Example(s): Code: This will output 5/13/08 13
<% =Date %>
<% =DatePart("D", Date) %>
This will output 7
<% =DatePart("W", 1/1/2000) %>
This will output 52
<% =DatePart("WW", "12/31/1999", 1, VBFIRSTFULLWeek) %>
__________________ jmurrayhead Did I help you out? Make me popular by clicking the icon!If you found a post helpful, please click the button in the lower right-hand corner of the post.Powered by ASP.Net |
| Sponsored Links |
| ||||
| Syntax - DateSerial(Year, Month, Day) Year - The Year argument is the year as a string or integer.Month - The Month argument is the month as a string or integer.Day - The Day argument is the Day as a string or integer. The DateSerial function converts the arguments into the variant of subtype Date. Example(s): Code: This will output 5/13/08
<% =DateSerial(2008, 5, 13) %>
This will output 5/13/08
<% =DateSerial("08", "5", "13") %>
|
| ||||
| Syntax - DateValue(Date) The DateValue function converts an argument into the variant of subtype Date. The Date argument must be a string in valid date format or you will get an error message. Example(s): Code: This will output 5/13/2008
<% mystring = "05/13/2008" %>
<% =DateValue(mystring) %>
This will output 3/1/2001
<% =DateValue("3/1/2001") %>
|
| ||||
| Syntax - Day(date) The Day function returns the number of the current day of the month using any valid date expression as an argument. You can also use the Date and Now functions as the argument. Example(s): Code: 'This will output 16
<% =Day(Date) %>
'This will ouput 12
<% =Date("5/12/2008") %>
|
| ||||
| Syntax - Eval(Expression) The Eval function takes a single argument, evaluates it as a VBScript expression, and returns the result of this evaluation. If the expression is of the form a = b, it is treated as an equality comparison. If the comparison is true, then True is returned. Otherwise, False is returned. Example(s): Code: 'This will ouput True
Dim var1, var2
var1 = 5.6
var2 = 5.6
Eval("var1 = var2")
|
![]() |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
| Sponsored Links |
| ASP.NET Resource Index a directory of ASP.NET tutorials, applications, scripts, assemblies and articles for the novice to professional developer. Free Web Directory Including Chats and Forums Resources, Offer automatic, instant and free directory submissions. | URLZ Web Directory URLZ Web Directory Free Web Directory - Add Your Link The Little Web Directory | Free Web Directory Pegasus free web directory is a free directory organised by categories. Web Directory & SEO Services dirroot web directory |