Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Wednesday, November 27, 2024 
 
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!
 Architect Forums - SalesLogix Scripting & Customization
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.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: DateEdit Format
satmane
Posts: 13
 
DateEdit FormatYour last visit to this thread was on 1/1/1970 12:00:00 AM
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

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: DateEdit FormatYour last visit to this thread was on 1/1/1970 12:00:00 AM
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.
[Reply][Quote]
satmane
Posts: 13
 
Re: DateEdit FormatYour last visit to this thread was on 1/1/1970 12:00:00 AM
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


[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: DateEdit FormatYour last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
satmane
Posts: 13
 
Re: DateEdit FormatYour last visit to this thread was on 1/1/1970 12:00:00 AM
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


[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: DateEdit FormatYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Mar 07 11:03 AM
fiogf49gjkf0d
Quote:
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
  1. interval - Required. String expression that is the interval you want to add. See Settings section for values.
  2. 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.
  3. 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.
[Reply][Quote]
 Page 1 of 1 
  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!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/27/2024 9:40:02 AM