Convert system UTC time to EDT time
Hi,
I am trying to convert my bartender label time from UTC to EDT through VB. This has to be done through VB because we cannot change the SAP system time. I wrote the following code. For some reason, I cannot get it to display "hh:mm AM/PM". It kept display "mm/dd/yy hh:mm AM/PM" regardless how I modified the program. Could someone point to me what wrong with my code. Thank you in advance for your help.
-
Paweł Gancarz
★ BarTender Hero ★
Hi, Minh
You insert two data sources, one you set the date and the other the time, and in them you set the parameters manually.
In Date, additionally, in the transform tab in the suffix, you set two spaces to separate the information from each other.
Maybe this is what you meant?0 -
Peter Thane
★ BarTender Hero ★
Make sure your Data Type is set to Text and not Date and a specified Date Format as that will override the VB settings.
For the VB FormatDateTime command you only need to type in the number 4 to get the VB to apply the VBShortTime.
This does not include the AM/PM and so you will probably need to add in a second string this time set as a Date Type with a Custom tt setting.
0 -
Minh Van
★ BarTender Hero ★
Thank you. It works now.
0
Please sign in to leave a comment.
Comments
3 comments