Hi,
I have a date field in a dataset that is bringing back UK formatted dates
(dd/MM/yyyy) from a UK configured SQL Server on a UK configured server. In RS
the preview displays these dates, again as UK - everything is fine so far...
My problem is when I run the report the dates are output in US format
(MM/dd/yyyy). Even if I set the textbox's format to be the correct style
date, the values are always US style.
Any help much appreciated.
AlIf there is no language information set on the text box, the language
of the report is used. If the language of the report is not set, the
language of the Web browser is used. If the language of the Web browser
is not set, the language of the operating system of the report server
is used. For example, if you set a specific language on a text box that
displays date information, then that text box is always displayed with
the date format for that language even if the report, Web browser or
server is set to a different language.
Showing posts with label formatted. Show all posts
Showing posts with label formatted. Show all posts
Thursday, March 8, 2012
Tuesday, February 14, 2012
Date as part of primary key?
I have three items which make up the primary key:
ProjectNumber, Hardware, Date
Problem: The Date is formatted with date and time, how can I add a record and use just the date?
Currently I use GetDate() in my stored proc.
Mike BDates are not stored in any particular format. They are stored as a numeric value that indicates the number of days elapsed from a baseline date and the number of seconds elapsed since midnight (the decimal portion).
If you only want to store the whole-date portion, then instead of storing getdate store the results of this expression:
convert(char(10), getdate(), 120)
This will yield a time value equal to midnight. It's up to your interface to determine how the value is displayed.|||Dates are not stored in any particular format. They are stored as a numeric value that indicates the number of days elapsed from a baseline date and the number of seconds elapsed since midnight (the decimal portion).
If you only want to store the whole-date portion, then instead of storing getdate store the results of this expression:
convert(char(10), getdate(), 120)
This will yield a time value equal to midnight. It's up to your interface to determine how the value is displayed.
Exactly what I wanted, thank you!
Mike B
ProjectNumber, Hardware, Date
Problem: The Date is formatted with date and time, how can I add a record and use just the date?
Currently I use GetDate() in my stored proc.
Mike BDates are not stored in any particular format. They are stored as a numeric value that indicates the number of days elapsed from a baseline date and the number of seconds elapsed since midnight (the decimal portion).
If you only want to store the whole-date portion, then instead of storing getdate store the results of this expression:
convert(char(10), getdate(), 120)
This will yield a time value equal to midnight. It's up to your interface to determine how the value is displayed.|||Dates are not stored in any particular format. They are stored as a numeric value that indicates the number of days elapsed from a baseline date and the number of seconds elapsed since midnight (the decimal portion).
If you only want to store the whole-date portion, then instead of storing getdate store the results of this expression:
convert(char(10), getdate(), 120)
This will yield a time value equal to midnight. It's up to your interface to determine how the value is displayed.
Exactly what I wanted, thank you!
Mike B
Subscribe to:
Posts (Atom)