11/27/2024 9:24:18 AM
|
|
slxdeveloper.com Community Forums |
|
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
|
|
|
|
DateEdit Format
Posted: 23 Feb 07 6:21 AM
|
fiogf49gjkf0d Hello , I have DateEdit display date when i run my application under UK System 'dd/mm/yyyy' showing correctly but when i run my application under US System 'mm/dd/yyyy' showing incorrect foramt.
how i get my users date format setting or other solution to me.
Satmane
|
|
|
|
Re: DateEdit Format
Posted: 24 Feb 07 5:02 AM
|
fiogf49gjkf0d What have you set the format property to ? should just be "ddddd" - don't hardcode to a specific format. This format will display the date as US/UK or whatever the control panel short date format is set to. |
|
|
|
Re: DateEdit Format
Posted: 28 Feb 07 1:24 PM
|
fiogf49gjkf0d Hello, Ok. I have '27/02/2007' text value how i get this format "ddddd" date value.
Saad
|
|
|
|
Re: DateEdit Format
Posted: 01 Mar 07 3:02 AM
|
fiogf49gjkf0d I have no idea what you mean !! "ddddd" is the entry you place into the Format property of the DateEdit control after setting the DateFormat to Date |
|
|
|
Re: DateEdit Format
Posted: 01 Mar 07 9:48 AM
|
fiogf49gjkf0d Fine. How i Add 7 days to my date dbdate
dbdate as double
dbdate = CDate(Format(Now,"ddddd"))
Tkx
Saad
|
|
|
|
Re: DateEdit Format
Posted: 02 Mar 07 11:03 AM
|
fiogf49gjkf0d How i Add 7 days to my date dbdate |
|
To add to a date, use VBScript's DateAdd function:
newdate = DateAdd("d", 7, dbdate)
From the VBScript docs (which you can get here: http://www.slxdeveloper.com/page.aspx?action=viewarticle&articleid=30)
DateAdd Function See Also DateDiff Function | DatePart Function
Returns a date to which a specified time interval has been added.
DateAdd(interval, number, date)
Arguments
- interval - Required. String expression that is the interval you want to add. See Settings section for values.
- number - Required. Numeric expression that is the number of interval you want to add. The numeric expression can either be positive, for dates in the future, or negative, for dates in the past.
- date - Required. Variant or literal representing the date to which interval is added.
Settings
The interval argument can have the following values:
Setting Description yyyy = Year q = Quarter m = Month y = Day of year d = Day w = Weekday ww = Week of year h = Hour n = Minute s = Second
Remarks You can use the DateAdd function to add or subtract a specified time interval from a date. For example, you can use DateAdd to calculate a date 30 days from today or a time 45 minutes from now. To add days to date, you can use Day of Year ("y"), Day ("d"), or Weekday ("w").
The DateAdd function won't return an invalid date. The following example adds one month to January 31:
NewDate = DateAdd("m", 1, "31-Jan-95") In this case, DateAdd returns 28-Feb-95, not 31-Feb-95. If date is 31-Jan-96, it returns 29-Feb-96 because 1996 is a leap year.
If the calculated date would precede the year 100, an error occurs.
If number isn't a Long value, it is rounded to the nearest whole number before being evaluated. |
|
|
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|