Morning All. Has anyone had any dealings with `for...
# suitescript
k
Morning All. Has anyone had any dealings with
format.format({value: '11:00 PM', type: format.Type.TIMEOFDAY, timezone: format.Timezone.AUSTRALIA_SYDNEY});
b
use format.format to format a Date as a string use format.parse to format a string as a Date
k
Thanks. I have reverted to using moment.js as it will convert 12hour string into a 24 hour string which i can then use.
b
generally N/format is only useful for values from netsuite, or values to be used in netsuite
k
yep that is what i am finding lol
b
in your case, you would use format.format to ensure that your Date is converted to strings in the current user's datetime format and timezone
k
but they value was coming from a search just not in the right format. and also it came as a string.