UTC Date Format
Hi,
I am facing the following problem.
Say If I use the following select command
select upd_date
from table
where id=123
I get as result => 22.08.07
I know that this result is in UTC Format.
I would like to get the localformat with hour min and sec.
Which function do I have to use for it, to get the local time?
select ?func?( upd_date )
from table
where id=123
Google leads me to SYS_EXTRACT_UTC.
1st of all I can't use it with my column upd_date.
But I think this function is if the stored value would be in localtime
and I would like to get the UTC date time of it. LOCAL => UTC.
I want the opposite version. UTC => LOCAL
thanks for any hint
aykut
unfortunately returns your code the stored date value as is and not the converted localdate.
say, user sets a meeting date via GUI.
user sees the local date, e.g. 31.11.2007 14:01:23
User lives in an area with the timezone UTC +1 e.g. in London,
(the database is set as UTC +1 as timezone)
that means the value is stored as 31.11.2007 15:01:23
The conversion depends on summer and winter time.
So if I submit a SELECT for a stored value: "31.11.2007 14:01:23"
I expect to get "31.11.2007 15:01:23"
With your SQL I get the same value as is in the database.
Similar Messages
-
Can the regional settings be changed for PowerBI or are we stuck with UTC? Tried googling but the only hits for 'regional powerbi' relate to the portal being available in that region, not any kind of localisation configuration
I have a workbook that is set to auto refresh. I've added a 'last refreshed' label to the front page, but when refreshed on PowerBI it shows the time in UTC (10.5 hrs off from where I am).
I'm not a sharepoint person so will need steps and diagrams if it's a sharepoint config setting :)
Jakub @ Adelaide, Australia BlogHi Ed,
I have a date dimension and I add a computed column to it. It's called RefreshDate. The code for the computed column is =NOW()
I then use this column to show to the user when the model was last refreshed.
Hi Greg, not really interested in workarounds at this time (i have another thread going for that & my data source is web apis, not a relational db with datetime functions) -
this is more of a question of "is it possible to choose which timezone is used by the powerbi vertipaq engine for scheduled refreshes? yes/no"
We are working in a single time zone, but the PowerBI vertipaq engine looks like it's lives in london.
It shows the correct current time on the local user's PC when I (or a user) refreshes this model locally. It shows the UTC date (my time zone - 10.5 hrs) when the report is refreshed by powerbi.
I have a workaround going in my report currently using powerquery to get the utc date and manually add 10.5 hrs + add a label to my report that states this is a fixed 10.5hr. This is a hack because we're in a daylight savings zone, so in a few months
the tz will revert to +9.5hrs and i'll need to manually fix this again unless i'm able to set powerbi to use my time zone.
The sharepoint guys here have changed every setting they know about in sharepoint online/o365 in regards to time zones and localisation. The date format and dates shown are correct for the 'web pages' part of powerbi (the refresh history, the formatting
of the dates on the powerview reports etc), but the time zone used when powerbi executes the NOW() dax command appears to be set to UTC.
Thanks
Jakub @ Adelaide, Australia Blog -
Converting time stamp in SECONDS to a calendar date format.. problems
Hello. I'm trying to convert a long interger that represents the number of SECONDS passed since the 1970 date
the number was originally generated by php's mktime() function
one of the numbers I have for example is this : 1126933200
I haven't done the math but this is a date probably around september of 2005.. it's irrelevant anyhow.
I want to convert this to a date format I can use in java. I've tried to create a new date like so :
Date date = new Date(1126933200);
I've also tried it with the calendar method like so :
Calendar calendar = new GregorianCalendar();
calendar.setTimeInMillis(1126933200);
it was only then that I realized that both these methods require the number of MILLI seconds. So I tried doing a simple multiplication by 1000 on my original number and then I started getting a "integer number too large" error when trying to compile.
so i'm kind of at a loss here.. i figure I could make a function myself that would divide my number in days of 86400 seconds.. and then i'd have to keep in mind the bisectal (sp) and the months with more and less days etc.. but i'm sure there must be an easier way.
and i don't get why a method who's meant to receive a very long number is giving me an error when i try to give one to it.
your help is appreciated as always. thanksHello. I'm trying to convert a long interger that
represents the number of SECONDS passed since the
1970 date
the number was originally generated by php's mktime()
function
one of the numbers I have for example is this :
1126933200
I haven't done the math but this is a date probably
around september of 2005.. it's irrelevant anyhow.
I want to convert this to a date format I can use in
java. I've tried to create a new date like so :
Date date = new Date(1126933200);
I've also tried it with the calendar method like so
Calendar calendar = new GregorianCalendar();
calendar.setTimeInMillis(1126933200);
it was only then that I realized that both these
methods require the number of MILLI seconds. So I
tried doing a simple multiplication by 1000 on my
original number and then I started getting a "integer
number too large" error when trying to compile.So you needed to add L to one of the numbers.
Note you also need to define what timezone that seconds number represents.
With Gregorian it is going to use the local timezone (the code here will anyways). The code using Date is using the UTC timezone. -
Convert String to java UTC date then to sql date
Hi,
I am trying to convert string (MM/dd/yyyy format) to UTC date time and store in the database.
This is what I did:
String dateAsString = "10/01/2007";
SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy");
formatter.setTimeZone(TimeZone.getTimeZone("GMT"));
formatter.setLenient(false);
java.util.date dateValue = formatter.parse(dateAsString, new ParsePosition(0));
dateValue will be Sun Sep 30 20:00:00 EDT 2007 in UTC.
Now I need to store this date and time to MS SQL database.
I used the following code:
java.sql.Date sqlDateValue = new java.sql.Date(parsedToDate.getTime());
But this code give only the date, not time 2007-09-30
Can anybody tell me how I can change this java date to sql date (or datetime?) so that I can get both date and time.
Thanks,
semajsemaj07 wrote:
Hi,
I am trying to convert string (MM/dd/yyyy format) to UTC date time and store in the database.
This is what I did:
String dateAsString = "10/01/2007";
SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy");
formatter.setTimeZone(TimeZone.getTimeZone("GMT"));
formatter.setLenient(false);
java.util.date dateValue = formatter.parse(dateAsString, new ParsePosition(0));
dateValue will be Sun Sep 30 20:00:00 EDT 2007 in UTC.
Now I need to store this date and time to MS SQL database.
I used the following code:
java.sql.Date sqlDateValue = new java.sql.Date(parsedToDate.getTime());
But this code give only the date, not time 2007-09-30
Can anybody tell me how I can change this java date to sql date (or datetime?) so that I can get both date and time.
Thanks,
semajTake a look at java.sql.Timestamp:
http://java.sun.com/javase/6/docs/api/java/sql/Timestamp.html
Edited by: hungyee98 on Oct 17, 2007 8:57 AM -
Is there a documented formula for converting UTC date/time stamps in CallDetailRecords (e.g., 1074902387) to a recognizable time/date?
In Call Manager, the CDR exports are in EPOCH time. Here is the formula to convert epoch time in a Call Manager CDR to a standard format in excel. After using the formula, you will need to format the cell for date and time.
=(((E2-(6*3600))/86400)+25569)
E2 = cell reference
6 = Timezone Offset (this is Central Standard time)
3600 = Number of seconds in an hour
86400 = Number of seconds in a day
25569 = Excel hack because excel counts epoch from 1/1/1904 and most others start at 1/1/1970.
Found this formula on the following webpage:
http://ciscovoiceguru.com/473/convert-epoch-utc-time-in-excel/ -
I am using following function to convert NSDate in "UTC" date.
-(NSString *)getUTCFormateDate:(NSDate *)localDate
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
NSTimeZone *timeZone = [NSTimeZone timeZoneWithName:@"UTC"];
[dateFormatter setTimeZone:timeZone];
[dateFormatter setDateFormat:@"YYYY-MM-dd HH:mm:ss"];
NSString *dateString = [dateFormatter stringFromDate:localDate];
return dateString;
I am getting result correct for some dates and I am not getting it correct for some of date.it converts time perfectly , but for some date it converts year to the next year.
following are some observation.
firstDate = 2008-12-27 17:17:58 +0530.
firstUtcDate = 2008-12-27 11:47:58.
secondDate = 2008-12-29 16:30:00 +0530.
secondUtcDate = 2009-12-29 11:00:00 //the year has been changed.
thirdDate = 2008-12-29 17:00:00 +0530
thirdUtcDate = 2009-12-29 11:30:00 //again the year has been changed.
Can anyone tell me what is problem with function.
Thaks
Message was edited by: xmax
Message was edited by: xmaxxmax wrote:
I am using following function to convert NSDate in "UTC" date.
-(NSString *)getUTCFormateDate:(NSDate *)localDate
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
NSTimeZone *timeZone = [NSTimeZone timeZoneWithName:@"UTC"];
[dateFormatter setTimeZone:timeZone];
[dateFormatter setDateFormat:@"YYYY-MM-dd HH:mm:ss"];
NSString *dateString = [dateFormatter stringFromDate:localDate];
return dateString;
Can anyone tell me what is problem with function.
Try changing the year formatting arguments to "yyyy". "YYYY" means something else besides the year: Year (of "Week of Year"), used in ISO year-week calendar. May differ from calendar year.
See the Unicode docs for an explanation.
charlie -
Is there a function to convert UTC time to a normal date format?
I have the stored seconds since the 'epoch' -1970 and would like to convert that over to a normal date in a report.I wrote a code tip that has been published in a couple of journals and webboards. Here's a link to something may help you exactly:
http://www.revealnet.com/Pipelines/plsql/archives.htm#code29
Giovanni Jaramillo
null -
UTC Date Time and Normal Date Time
Hi All,
1. How UTC date time and Normal date time differs in siebel.
2. If legacy data needed to be loaded into siebel, in siebel few fields are date time and UTC date time fields. what would happen if we load both normal date time and UTC date time without considering them techinically?
3. UTC date time holds any specific format in physical database? If we want to load legacy data to UTC date time format what is the query to manipulate it?
Thankyou
SeanSean,
Please check document below, I believe it has most of the answers to the questions you have:
http://download.oracle.com/docs/cd/E14004_01/books/GlobDep/GlobDepUTC.html
Hope it helps,
Wilson -
Hi All ,
I need date format in the following format 2009-01-28T09:09:38.0Z...
please let me know how can i get thisThe Z in a time string typically refers to Zulu time or Greanwich Mean Time, so if you need the zulu time you need to convert your date to a timestamp containing time zone information and shift it to GMT time then format the output as required like so:
with sample_data as (select to_date('2009-01-28 9:09:38','RRRR-MM-DD HH24:MI:SS') dt from dual)
select to_char( cast( dt as timestamp with time zone) -- Cast the date to a timestamp containing time zone
at TIME zone 'GMT' -- shift the timestamp to the UTC time zone
, 'YYYY-MM-DD"T"HH24:MI:SS.FF1')||'Z' -- Format the timestamp as a character string
from sample_data; -
Hi Tim,
I am facing some issues with formatting the date using XMLP. The following is the sample XML data file i am using:
<LIST_G_HEADER>
<G_HEADER>
<QUOTE_HEADER_ID>1455</QUOTE_HEADER_ID>
<QUOTE_NUMBER>2027</QUOTE_NUMBER>
<QUOTE_VERSION>1</QUOTE_VERSION>
<QUOTE_NAME>Test GM Report - Rabindra</QUOTE_NAME>
<SOURCE_NAME>Fletcher, MR. Paul</SOURCE_NAME>
<QUOTE_DATE>27-OCT-2005</QUOTE_DATE>
<CURRENCY_CODE>GBP</CURRENCY_CODE>
</G_HEADER>
</LIST_G_HEADER>
The formatting i use for my date field i.e <QUOTE_DATE>, ends up either with NO formatting or giving me an error "[010906_114656657][][ERROR] Invalid XSD string: 27-OCT-2005 (XMLP Template Viewer)". The default formatting available with the form field dialog box (MS-Word) feature also doesn't work.
I have the following formatting for this field in the form field:
<?format-date:QUOTE_DATE; 'MEDIUM' ?>
When i read the user guide, it reads that the date should be in the canonical format i.e: YYY-MM-DDThh:mm:ss+HH:MM
However i am not getting the date from the base table's in this format. Is the error happening due to incorrect format or is there some other reason behind this? Please let me know, how can i overcome this issue.
Thx,
NitinAs i mentioned in another thread
substring function and date format
Please use this standards
<?xdofx:expression?>
for extended SQL functions or
<?xdoxslt:expression?>
for extended XSL functions.
Use like
<?xdofx:rpad(LAST_NAME),30, ’x’)?>
<?xdofx:Instr(’abcabcabc’,’a’,2))?>
<?xdofx:upper(char)?>
<?xdofx:lower (char)?>
<?xdofx:greatest ( expr [, expr]... )?>
ETC..... -
How can we give the Data Format (File Type ) in Runtime
Hi all,
How can we give the Data Format (File Type ) in Runtime for the following method,
cl_gui_frontend_services=>gui_download.
Thanks in advance
SriThere is a filetype parameter which you can set
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
* BIN_FILESIZE =
filename =
* FILETYPE = 'ASC'
* APPEND = SPACE
* WRITE_FIELD_SEPARATOR = SPACE
* HEADER = '00'
* TRUNC_TRAILING_BLANKS = SPACE
* WRITE_LF = 'X'
* COL_SELECT = SPACE
* COL_SELECT_MASK = SPACE
* DAT_MODE = SPACE
* CONFIRM_OVERWRITE = SPACE
* NO_AUTH_CHECK = SPACE
* CODEPAGE = SPACE
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* WRITE_BOM = SPACE
* TRUNC_TRAILING_BLANKS_EOL = 'X'
* IMPORTING
* FILELENGTH =
changing
data_tab =
* EXCEPTIONS
* FILE_WRITE_ERROR = 1
* NO_BATCH = 2
* GUI_REFUSE_FILETRANSFER = 3
* INVALID_TYPE = 4
* NO_AUTHORITY = 5
* UNKNOWN_ERROR = 6
* HEADER_NOT_ALLOWED = 7
* SEPARATOR_NOT_ALLOWED = 8
* FILESIZE_NOT_ALLOWED = 9
* HEADER_TOO_LONG = 10
* DP_ERROR_CREATE = 11
* DP_ERROR_SEND = 12
* DP_ERROR_WRITE = 13
* UNKNOWN_DP_ERROR = 14
* ACCESS_DENIED = 15
* DP_OUT_OF_MEMORY = 16
* DISK_FULL = 17
* DP_TIMEOUT = 18
* FILE_NOT_FOUND = 19
* DATAPROVIDER_EXCEPTION = 20
* CONTROL_FLUSH_ERROR = 21
* NOT_SUPPORTED_BY_GUI = 22
* ERROR_NO_GUI = 23
* others = 24 -
Need to convert into date format
Hi all,
I need to convert '2008-11-26T11:07:38-06:00' [YYYY]-[MM]-[DD]T[HH]:[MM]:[SS][TIMEZONE]
in format 'YYYY-MM-DD HH:MM:SS'.
Thanks in advance.>
Thank you for your reply
But it is giving me output as '26-NOV-08'
And I want in format '2008-11-26 07:38' i.e 'YYYY-MM-DD HH:MM'.
>
Then you are not looking for a date, You are looking for a string.
The date format that gets displayed is dependent on nls_date_format parameter.
If you want a string in the format you asked, then,
SELECT TO_CHAR ( TO_DATE ( '2008-11-26T11:07:38-06:00', 'YYYY-MM-DD"T"HH24:MI:SS"-06:00"'), 'YYYY-MM-DD HH24:MM:SS')
FROM DUAL;Or if you just want the date to be displayed like that then
Do,
SQL> alter session set nls_date_Format="YYYY-MM-DD HH24:MI:SS";
Session altered.
SQL> SELECT TO_DATE ( '2008-11-26T11:07:38-06:00', 'YYYY-MM-DD"T"HH24:MI:SS"-06:00"') dt
2 FROM DUAL;
DT
2008-11-26 11:07:38
SQL> G. -
Changing date format at reporting level
Hello,
Will u plz tell me how can i change the date format at reporting level?
I want to display date in dd/mm/yyyy, but by default its showing mm/dd/yyyy.
Delta is already loaded in the system, so i don't want to disturb regular data loading.
Is there any way so that i can change the format of date.
Plz help me out.
Thanks,
Regards,
SteveHi steve
There r so many postings on the same topic
go through these previous threads
date format
Date format
u can find solution
regards
Ravi Kiran -
How to convert the numeric to date format
HI ,
We have created the date KF and selected the data type as DEC-numeric or counter and add in the cube.
the data for this fields in the cube are in numerics like 734.504, but when we execute the report it is converted in to date format dd.mm.yyyy.
My issue how this conversion is working in the backend while executing the report.
Regards.
venkataConversion is happening because of the type you had selected for the KF while creating it.
Check the type of the Key figure?
While creating the KF you might have selected the Type as Date and Data type -DEC : Counter or amount field with comma and sign.
that's the reason why you are getting the output values displayed in dd.mm.yyyy format.
For amount field - create a KF with type "AMOUNT" and unit -0currency or specify the currency of that region.
regards
KP -
How to get Date Format from Local Object.
Hi All,
I am new to Web Channel.
I need to know Date format From date of locale.
suppose there is a date "01/25/2010" date in date field I want to get string "mm/dd/yyyy". Actually I have to pass date format to backend when I call RFC.
Is there any way to get Date format from "Locale" object. I should get date format for local object
I get local object from "UserSessionData" object but how to get Date format from it.
I am not looking for Date value. I am looking for current local date format ("mm/dd/yyyy or dd/mm/yyyy or mon/dd/yyyy) whatever local date format. I could not find example which show how to get date format from "Locale" object.
Any help will be appreciated with rewards.
Regards.
Web ChannelHi,
You can get it from "User" or "Shop" business object.
Try to get User or Shop Business Object as shown below.
BusinessObjectManager bom = (BusinessObjectManager) userSessionData.getBOM(BusinessObjectManager.ISACORE_BOM);
User user = bom.getUser();
char decimalNotation = user.getDecimalPointFormat().getGroupingSeparator();
If you are seeing "1,234.00" then above code will return "."
I hope this information help you to resolve your issue.
eCommerce Developer.
Maybe you are looking for
-
Documentation on How to Develop an OPC Client Using LabWindows/CVI?
What documentation is there on how to develop an OPC client application using LabWindows/CVI? What tutorials, if any, are there? What reference manuals, if any are there? I am completely new to LabWindows/CVI. I will be starting soon with the tuto
-
Does anyone know if Vista runs on MacPro?
Just wondering if anyone has info on Windows Vista compatibility and functionality on MacPro. Like many, I have to keep a PC around to run certain applications, and I'm looking forward to the promise of the one box (MacPro) solution. Thanks!
-
Hi all, I have some questions, please help me soon. Table source: - How can I use URL template to display data of many columns, not only the text column? It means that do I have to concat these columns into one? - If I have a database with a hundreds
-
How do you set the value of an enumeratio​n programati​cally
I would like to be able to select (programatically) the value of an enumeration. I don't seem to be able to find any reference to how to do that. Thanks. Solved! Go to Solution.
-
Adobe Captivate 6 update (CP 6.0.1.240) is released
Hello All, Captivate 6.0.1.240 update is available now for on Adobe.com, you can download it from here : http://www.adobe.com/support/captivate/downloads.html Thanks, Vikram Adobe Support