LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Return DATE TIME without space

Hi,

 

I would like to return the sate and time in the format of:

 

DDMMYYHHMMSS 

 

As you can see I do not want any special characters or whitespace.

 

Is there a simple way to do this?  The labview date time vi doesn't offer this feature

 

Thanks

Richard

0 Kudos
Message 1 of 3
(821 Views)

 Hi,

 

Do you mean something like this?

Format Data time string.png

Xonmyth743_0-1663338707212.png

EDITED

 

Format Data time string.png

Xonmyth743_0-1663340103574.png

 

0 Kudos
Message 2 of 3
(816 Views)

@Xonmyth743 shows you that the Format Date/Time String can express a LabVIEW TimeStamp according to the Format String you specify (personally, I find a long series of numbers somewhat maddening -- you can't even (easily) sort them from "Oldest to Newest" unless you specify very carefully).

 

But what if you want something other than "Now" (the default when the Time Stamp input is unwired)?  What if you want to specify, say, January 6, 2021, 2 pm, EST?  There's another function, Date/Time to Seconds, that will take a series of numbers and Booleans and make a TimeStamp for you (among other things, this lets you test your code by seeing how a "known time" gets transformed to a Time Stamp, then back to your Numeric Format -- are the numbers the same?).

 

Bob Schor

0 Kudos
Message 3 of 3
(780 Views)