Forum Discussion
Sunil0741
4 years agoRegular Visitor
How to Convert date and time from PST to IST
I have a question in Power BI. I am using an ODBC data source lnked directly to power BI, which has a column of date and time recorded in PST timezone. Now I am looking to add a column in Power ...
v-chenwuz-msft
Community Support
4 years agoHi Sunil0741 ,
Or try use IF statement to identify date?
Like this:
ist =
VAR _selecteddate =
SELECTEDVALUE ( datetime_table[datetime] )
VAR _selecteddateYear =
YEAR ( _selecteddate )
VAR _start =
DATE ( _selecteddateYear, 3, 1 ) + 7
- WEEKDAY ( DATE ( _selecteddateYear, 3, 1 ), 2 ) + 7
VAR _end =
DATE ( _selecteddateYear, 11, 1 ) + 7
- WEEKDAY ( DATE ( _selecteddateYear, 11, 1 ), 2 )
RETURN
IF (
_selecteddate >= _start
&& _selecteddate <= _end,
_selecteddate + TIME ( 13, 30, 0 ),
_selecteddate + TIME ( 12, 30, 0 )
)
Result:
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Sunil0741
4 years agoRegular Visitor