Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

qliklearnervir
New Contributor III

want to show timestamp

Hi ,

I want to show date time stamp like 'YYYYMMDDhhmm' but while doing in the qlikview my expression is returning :

Exprerssion: =Date(Today(),'YYYYMMDDhhmm')

Output : 201509030000

but in hour and minute i want the value not 00 .

KIndly suggest.

Tags (1)
7 Replies
psankepalli
Contributor III

Re: want to show timestamp

Hi Vir,

As per QV Help. you can use Timestamp#

timestamp#( A, 'YYYY-MM-DD hh_mm' ) where A=8/6/97 09_00 returns:

    

Setting 1 Setting 2
String

1997-08-06 09_00

1997-08-06 09_00

Number

35648.375

35648.375

I hope this helps you.

hrlinder
Honored Contributor

Re: want to show timestamp

Expression =Date(now(),'YYYYMMDDHM')

Returns 201509031609

today() instead now delivers 2015090309

MVP
MVP

Re: want to show timestamp

replace today()          date

with now()                   timestamp

today([timer_mode] )

Returns the current date from the system clock. The timer_mode may have the following values:

0 Date at script run
1 Date at function call
2 Date when the document was opened

Default timer_mode is 2. The timer_mode = 1 should be used with caution, since it polls the operating system every second and hence could slow down the system.

now([ timer_mode])

Returns a timestamp of the current time from the system clock. The timer_mode may have the following values:

0 Time at previously finished reload (not currently ongoing reload)
1 Time at function call
2 Time when the document was opened 

Default timer_mode is 1. The timer_mode = 1 should be used with caution, since it polls the operating system every second and hence could slow down the system.

Arjunarao
Honored Contributor II

Re: want to show timestamp

Hi,

Please use like this:

Data1:

Load *, Timestamp(Today()) as NewDate;

LOAD timestamp(Start_time) as Start_time,timestamp(end_time) as end_time  Inline [

Start_time,end_time

08:25.32,

10:35:12,12:26:35

];

Capture.PNG

Capture.PNG

Arjunarao
Honored Contributor II

Re: want to show timestamp

Hi Vir, Did you able to get the solution?

MVP
MVP

Re: want to show timestamp

HI,

Use below expression

Exprerssion: =Date(Now(),'YYYYMMDDhhmm') 

OR

TimeStamp(Now(),'YYYYMMDDhhmm')


Hope this helps you.


Regards,

Jagan.

Arjunarao
Honored Contributor II

Re: want to show timestamp

Hi Did you able to manage to get the answer?

Community Browser